ctrlMousePosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(formatting and new command group)
(added seeAlso)
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:


|game1= arma3
|game1= arma3
|version1= 2.00
|version1= 2.00


Line 15: Line 14:
|r1= [[Array]]
|r1= [[Array]]


|x1= <code>_mousePos = [[ctrlMousePosition]] _ctrl;</code>
|x1= <sqf>private _mouseRelPos = ctrlMousePosition _ctrl;</sqf>


|seealso= [[setMousePosition]] [[getMousePosition]]
|seealso= [[ctrlSetMousePosition]] [[setMousePosition]] [[getMousePosition]] [[ctrlMapCursor]]
}}
}}

Latest revision as of 13:08, 7 May 2023

Hover & click on the images for description

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:
Array

Examples

Example 1:
private _mouseRelPos = ctrlMousePosition _ctrl;

Additional Information

See also:
ctrlSetMousePosition setMousePosition getMousePosition ctrlMapCursor

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