Difference between revisions of "ctrlMapCursor"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "(\| * )+\}\}" to "}}")
m (Text replacement - " {3,}\|" to " |")
Line 37: Line 37:
  
 
| [[Nothing]]
 
| [[Nothing]]
 
  
 
|x1= <code>_map [[ctrlMapCursor]] ["Track", "Arrow"];</code>
 
|x1= <code>_map [[ctrlMapCursor]] ["Track", "Arrow"];</code>
Line 59: Line 58:
 
[[forEach]] ("true" [[configClasses]] ([[configFile]] >> "CfgWrapperUI" >> "Cursors"));
 
[[forEach]] ("true" [[configClasses]] ([[configFile]] >> "CfgWrapperUI" >> "Cursors"));
 
};</code>
 
};</code>
 
  
 
| [[setMousePosition]], [[getMousePosition]]
 
| [[setMousePosition]], [[getMousePosition]]

Revision as of 18:25, 18 January 2021

Template:Command

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