ctrlMapCursor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Added to GUI control group)
(expanded, format, see also, example)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Changes the default the cursor that appears when interacting with a map control to a custom one.
| 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. The cursor is the name of a config entry from ''CfgWrapperUI / Cursors''. Some possible class names:
 
<br><br>
Use an empty string to restore the default cursor.
* Arrow
If the specified cursor does not exist, the default is used and no error is produced.
 
The cursor texture is one of the following and is '''case sensitive''':
* Track
* Track
* Move
* Move
* Array
* Scroll
* Scroll
 
* Rotate
Custom cursor is the name of a config entry from ''CfgWrapperUI / Cursors''. |= Description
* Track3D
* Move3D
* Rotate3D
* Raise3D
* Wait
* HC_move
* HC_overFriendly
* HC_overEnemy
* HC_overMission
* HC_unsel
<br>
'''NOTE''': Cursor name is '''case sensitive'''.|= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| control '''ctrlMapCursor''' [cursorTexture, customCursor] |= Syntax
| control '''ctrlMapCursor''' [defaultCursor, newCursor] |= Syntax


|p1= control: [[Control]] - Map control |= PARAMETER1  
|p1= control: [[Control]] - Map control |= PARAMETER1  


|p2= cursorTexture: [[String]] - Cursor texture name |= PARAMETER2  
|p2= defaultCursor: [[String]] - Cursor class name |= PARAMETER2  
 
|p3= newCursor: [[String]] - Cursor class name |= PARAMETER3


|p3= customCursor: [[String]] - Cursor class name |= PARAMETER3
| [[Nothing]] |= RETURNVALUE


| Nothing |= RETURNVALUE


|x1= <code>_map [[ctrlMapCursor]] ["Track", "Arrow"];</code>|= EXAMPLE1


|x1= <code>_map ctrlMapCursor ["Track", _customCursor]</code>|= EXAMPLE1
|x2= <code>[[uiNamespace]] [[setVariable]] ["_map",[[findDisplay]] 12 [[displayCtrl]] 51];
([[uiNamespace]] [[getVariable]] "_map") [[ctrlMapCursor]] ["Track","HC_overFriendly"];</code>|= EXAMPLE2


|x2= <code>uiNamespace setVariable ["_map",(findDisplay 12) displayCtrl 51];
|x3= <code>[[findDisplay]] 12 [[displayCtrl]] 51 [[ctrlMapCursor]] ["Scroll", "Wait"];</code>|= EXAMPLE3
(uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overFriendly"];</code>|= EXAMPLE1


____________________________________________________________________________________________
____________________________________________________________________________________________


| |= SEEALSO  
| [[setMousePosition]] |= SEEALSO  


|  |= MPBEHAVIOUR  
|  |= MPBEHAVIOUR  

Revision as of 00:54, 10 August 2014

Hover & click on the images for description

Description

Description:
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. The cursor is the name of a config entry from CfgWrapperUI / Cursors. Some possible class names:

  • Arrow
  • Track
  • Move
  • Scroll
  • Rotate
  • Track3D
  • Move3D
  • Rotate3D
  • Raise3D
  • Wait
  • HC_move
  • HC_overFriendly
  • HC_overEnemy
  • HC_overMission
  • HC_unsel

NOTE: Cursor name is case sensitive.
Groups:
Uncategorised

Syntax

Syntax:
control ctrlMapCursor [defaultCursor, newCursor]
Parameters:
control: Control - Map control
defaultCursor: String - Cursor class name
newCursor: String - Cursor class name
Return Value:
Nothing

Examples

Example 1:
_map ctrlMapCursor ["Track", "Arrow"];
Example 2:
uiNamespace setVariable ["_map",findDisplay 12 displayCtrl 51]; (uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overFriendly"];
Example 3:
findDisplay 12 displayCtrl 51 ctrlMapCursor ["Scroll", "Wait"];

Additional Information

See also:
setMousePosition

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section