Difference between revisions of "ctrlMousePosition"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|game([0-9]) ?= (.+) \|version([0-9]) ?= (.+) " to "|game$1= $2 |version$3= $4 ")
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command
+
{{RV|type=command
  
|game1= arma3dev |Game name=
+
|game1= arma3
 +
|version1= 2.00
  
|version= 2.00 |Game version=
+
|gr1= GUI Control - Positioning
  
|gr1= GUI Control |GROUP1=
+
|descr= Returns position of the mouse on the screen relative to UI Control in UI coordinates. Also works within [[CT_CONTROLS_GROUP]]s. In that case, returned position is relative to the position of the group.
____________________________________________________________________________________________
 
  
|descr= Returns position of the mouse on the screen relative to UI Control in UI coordinates. |Description=
+
|s1= [[ctrlMousePosition]] control
 
 
|mp= |Multiplayer Behaviour=
 
 
 
|pr= |Problems=
 
____________________________________________________________________________________________
 
 
 
|s1= [[ctrlMousePosition]] control |Syntax=
 
  
 
|p1= control: [[Control]]
 
|p1= control: [[Control]]
  
|r1= [[Array]] |Return Value=
+
|r1= [[Array]]
____________________________________________________________________________________________
 
  
|x1= <code>_mousePos = [[ctrlMousePosition]] _ctrl;</code> |Example 1=
+
|x1= <code>_mousePos = [[ctrlMousePosition]] _ctrl;</code>
____________________________________________________________________________________________
 
  
|seealso= [[setMousePosition]] [[getMousePosition]] |See Also=
+
|seealso= [[setMousePosition]] [[getMousePosition]]
 
}}
 
}}
 
<dl class="command_description">
 
<!-- BEGIN Note Section -->
 
 
<!-- END Note Section -->
 
</dl>
 
 
<h3 style="display:none">Bottom Section</h3>
 
 
<!-- CONTINUE Notes -->
 
<dl class="command_description">
 
<dd class="notedate">Posted on October 2, 2020 - 11:14 (UTC)</dd>
 
<dt class="note">[[User:Dscha|Dscha]]</dt>
 
<dd class="note">
 
 
[[ctrlMousePosition]] also do work with Controls within a [[:Category:Command_Group:_GUI_Control|Control Group]]. The return would be the position, relative to its parent position ([[ctrlParentControlsGroup]]).
 
 
</dd>
 
</dl>
 
<!-- DISCONTINUE Notes -->
 

Latest revision as of 14:55, 3 May 2021

Hover & click on the images for description

Description

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.
Groups:
GUI Control - Positioning

Syntax

Syntax:
ctrlMousePosition control
Parameters:
control: Control
Return Value:
Array

Examples

Example 1:
_mousePos = ctrlMousePosition _ctrl;

Additional Information

See also:
setMousePosition getMousePosition

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