getMousePosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{GameCategory\|(arma[0123])\|[ _]?New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}")
(updated SeeAlso)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.54


|1.54|Game version=
|gr1= GUI Control - Positioning


|gr1= GUI Control |GROUP1=
|descr= Returns mouse position in UI coordinates.
____________________________________________________________________________________________


| Returns mouse position in UI coordinates. |DESCRIPTION=
|s1= [[getMousePosition]]
____________________________________________________________________________________________


| '''getMousePosition''' |SYNTAX=
|r1= [[Array]] - position in format [x, y], where x and y are UI coordinates
| [[Array]] - position in format [x, y], where x and y are UI coordinates |RETURNVALUE=
____________________________________________________________________________________________
 
|x1= <code>_pos = [[getMousePosition]];</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[setMousePosition]], [[ctrlMapCursor]], [[reversedMouseY]] |SEEALSO=
|x1= <sqf>getMousePosition params ["_mouseX", "_mouseY"];</sqf>


|seealso= [[setMousePosition]] [[ctrlSetMousePosition]] [[ctrlMousePosition]] [[ctrlMapCursor]] [[reversedMouseY]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma3|New Scripting Commands}}

Latest revision as of 12:06, 7 May 2023

Hover & click on the images for description

Description

Description:
Returns mouse position in UI coordinates.
Groups:
GUI Control - Positioning

Syntax

Syntax:
getMousePosition
Return Value:
Array - position in format [x, y], where x and y are UI coordinates

Examples

Example 1:
getMousePosition params ["_mouseX", "_mouseY"];

Additional Information

See also:
setMousePosition ctrlSetMousePosition ctrlMousePosition ctrlMapCursor reversedMouseY

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