ctrlMousePosition: Difference between revisions
(formatting and new command group) |
BrettMayson (talk | contribs) mNo edit summary |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 2.00 | |version1= 2.00 | ||
| Line 13: | Line 12: | ||
|p1= control: [[Control]] | |p1= control: [[Control]] | ||
|r1= [[ | |r1= [[Position#Introduction|Position2D]] - x and y UI coordinates of the mouse position | ||
|x1= < | |x1= <sqf>private _mouseRelPos = ctrlMousePosition _ctrl;</sqf> | ||
|seealso= [[setMousePosition]] [[getMousePosition]] | |seealso= [[ctrlSetMousePosition]] [[setMousePosition]] [[getMousePosition]] [[ctrlMapCursor]] | ||
}} | }} | ||
Latest revision as of 03:55, 4 May 2026
Description
- Description:
- Returns position of the mouse on the screen relative to UI Control in UI coordinates. Also works within CT_CONTROLS_GROUPs. In that case, returned position is relative to the position of the group.
- Groups:
- GUI Control - Positioning
Syntax
- Syntax:
- ctrlMousePosition control
- Parameters:
- control: Control
- Return Value:
- Position2D - x and y UI coordinates of the mouse position
Examples
- Example 1:
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note