ctrlPosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (fixed arma 3 version)
m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">")
Line 37: Line 37:


<dl class="command_description">
<dl class="command_description">
<dt></dt>
<dd class="notedate">Posted on November 7, 2020 - 01:23 (UTC)</dd>
<dd class="notedate">Posted on November 7, 2020 - 01:23 (UTC)</dd>
<dt class="note">[[User:Larrow|Larrow]]</dt>
<dt class="note">[[User:Larrow|Larrow]]</dt>

Revision as of 14:29, 5 April 2021

Hover & click on the images for description

Description

Description:
Returns the current position of 2D control as [x, y, w, h] array. For 3D control it returns relative [x, y, z]. If the control is part of a CT_CONTROLS_GROUP, the returned position will be relative to the group's position.
Groups:
GUI Control - Positioning

Syntax

Syntax:
ctrlPosition controlName
Parameters:
controlName: Control
Return Value:
Array in format [x, y, w, h] (2D) or [x, y, z] (3D)

Examples

Example 1:
_pos = ctrlPosition _control;

Additional Information

See also:
ctrlCreatectrlDeletectrlModelctrlSetModelctrlSetPositionctrlClassNamedisplayCtrlctrlModelScalectrlSetModelScalectrlModelDirAndUpctrlSetModelDirAndUp

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
Posted on November 7, 2020 - 01:23 (UTC)
Larrow
If the control is a ControlsTable header or row control the returned position is relative to the ControlsTable position.