{"name":"ctrlMousePosition","operator":null,"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","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.00"}],"since":{"game":"arma3","name":"Arma 3","version":"2.00"},"arma3_since":"2.00","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":null,"types":["Control"],"since":null,"text":"control: Control"}],"returns":{"type":"Position2D","types":["Position2D"],"description":"x and y UI coordinates of the mouse position","text":"Position2D - x and y UI coordinates of the mouse position"},"form":"unary","operator":null,"left":null,"right":{"text":"control","types":["Control"]}}],"examples":[{"text":"```sqf\nprivate _mouseRelPos = ctrlMousePosition _ctrl;\n```","code":["private _mouseRelPos = ctrlMousePosition _ctrl;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["ctrlSetMousePosition","setMousePosition","getMousePosition","ctrlMapCursor"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control - Positioning","Introduced with Arma 3 version 2.00","Scripting Commands"]}