getMousePosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
(updated SeeAlso)
 
(25 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
____________________________________________________________________________________________


| Returns mouse position in UI coordinates. |DESCRIPTION=
|descr= Returns mouse position in UI coordinates.
____________________________________________________________________________________________


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


| [[setMousePosition]], [[ctrlMapCursor]], [[reversedMouseY]] |SEEALSO=
|r1= [[Array]] - position in format [x, y], where x and y are UI coordinates


|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>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]

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