Arma 3 Scripting

Command in GUI Control - Positioning

ctrlMousePosition

Also available as Markdown and JSON, or read the original wiki page.

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.

Syntax

ctrlMousePosition control

Parameters:

Returns: Position2D - x and y UI coordinates of the mouse position

Examples

Example 1

private _mouseRelPos = ctrlMousePosition _ctrl;

See also

ctrlSetMousePosition · setMousePosition · getMousePosition · ctrlMapCursor