getMousePosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[[Cc]ategory:[ _]?Arma[ _]3:[ _]([^|]*)[ _]?\|.*\]\]" to "{{GameCategory|arma3|$1}}")
(updated SeeAlso)
 
(20 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>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma3|New_Scripting_Commands_List}}

Latest revision as of 13: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