{"name":"ctrlMousePosition","title":"ctrlMousePosition","type":"command","url":"https://community.bistudio.com/wiki/ctrlMousePosition","revid":378524,"updated":"2026-05-04T01:55:42Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","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.","syntaxes":[{"syntax":"ctrlMousePosition control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Position2D","type_expr":"Position2D","description":"x and y UI coordinates of the mouse position"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["private _mouseRelPos = ctrlMousePosition _ctrl;"]}],"see_also":["ctrlSetMousePosition","setMousePosition","getMousePosition","ctrlMapCursor"]}