ctrlMapCursor

From Bohemia Interactive Community
Revision as of 00:43, 9 February 2016 by Bull A (talk | contribs)
Jump to navigation Jump to search

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 addEventHandler ["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"]; }; }];