Difference between revisions of "ctrlMapCursor"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
 
{{Command|Comments=
 
{{Command|Comments=
____________________________________________________________________________________________
 
  
 
| arma2 |Game name=
 
| arma2 |Game name=
Line 7: Line 6:
  
 
|gr1= GUI Control - Map |GROUP1=
 
|gr1= GUI Control - Map |GROUP1=
____________________________________________________________________________________________
 
  
 
| Changes the default cursor that appears when interacting with a map control to a custom one. Use an empty string to restore the default cursor. If the specified cursor does not exist, the default is used and no error is produced. ( NOT in case of Arma 3. Using an empty string will result in an error: "No entry 'bin\config.bin/CfgWrapperUI/Cursors.' ). The cursor is the name of a config entry from ''CfgWrapperUI / Cursors''. This command has the following specifics:
 
| Changes the default cursor that appears when interacting with a map control to a custom one. Use an empty string to restore the default cursor. If the specified cursor does not exist, the default is used and no error is produced. ( NOT in case of Arma 3. Using an empty string will result in an error: "No entry 'bin\config.bin/CfgWrapperUI/Cursors.' ). The cursor is the name of a config entry from ''CfgWrapperUI / Cursors''. This command has the following specifics:
Line 29: Line 27:
 
* HC_unsel
 
* HC_unsel
 
'''NOTE1''': Cursor names are '''case sensitive'''.|DESCRIPTION=
 
'''NOTE1''': Cursor names are '''case sensitive'''.|DESCRIPTION=
____________________________________________________________________________________________
 
  
 
| control '''ctrlMapCursor''' [defaultCursor, newCursor] |SYNTAX=
 
| control '''ctrlMapCursor''' [defaultCursor, newCursor] |SYNTAX=
Line 63: Line 60:
 
};</code>|EXAMPLE4=
 
};</code>|EXAMPLE4=
  
____________________________________________________________________________________________
 
  
 
| [[setMousePosition]], [[getMousePosition]] |SEEALSO=  
 
| [[setMousePosition]], [[getMousePosition]] |SEEALSO=  
  
 
|  |MPBEHAVIOUR=  
 
|  |MPBEHAVIOUR=  
____________________________________________________________________________________________
 
 
}}
 
}}
  

Revision as of 01:42, 17 January 2021

Template:Command

Notes

Bottom Section

Posted on February 8, 2016 - 22:43 (UTC)
Bull A
When using this command, the cursor will change for the whole display, resulting in visual glitches. Adding the onMouseMoving event handler can help solve this problem: _control ctrlAddEventHandler ["MouseMoving",{ _this params [ ["_mapCtrl",controlNull,[[[controlNull]]]], ["_xPos",-1,[0]], ["_yPos",-1,[0]], ["_mouseIn",false,[[[true]]]] ]; if (_mouseIn) then { // Mouse is in control area _mapCtrl ctrlMapCursor ["","Track"]; } else { // Mouse is out of control area, goes back to arrow _mapCtrl ctrlMapCursor ["","Arrow"]; }; }];