ctrlPosition: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma1 | | arma1 | ||
|1.00 | |1.00 | ||
|gr1= GUI Control | |gr1= GUI Control | ||
| Returns the current position of 2D control as [x, y, w, h] array. For 3D control it returns relative [x,y,z]. | | Returns the current position of 2D control as [x, y, w, h] array. For 3D control it returns relative [x,y,z]. | ||
| '''ctrlPosition''' controlName | | '''ctrlPosition''' controlName | ||
|p1= controlName: [[Control]] | |p1= controlName: [[Control]] | ||
| [[Array]] | | [[Array]] | ||
|x1= <code>_pos = [[ctrlPosition]] _control;</code> | |x1= <code>_pos = [[ctrlPosition]] _control;</code> | ||
| [[ctrlCreate]], [[ctrlDelete]], [[ctrlModel]], [[ctrlSetModel]], [[ctrlSetPosition]], [[ctrlClassName]], [[displayCtrl]], [[ctrlModelScale]], [[ctrlSetModelScale]], [[ctrlModelDirAndUp]], [[ctrlSetModelDirAndUp]] | | [[ctrlCreate]], [[ctrlDelete]], [[ctrlModel]], [[ctrlSetModel]], [[ctrlSetPosition]], [[ctrlClassName]], [[displayCtrl]], [[ctrlModelScale]], [[ctrlSetModelScale]], [[ctrlModelDirAndUp]], [[ctrlSetModelDirAndUp]] | ||
}} | }} |
Revision as of 00:30, 18 January 2021
Description
- Description:
- Returns the current position of 2D control as [x, y, w, h] array. For 3D control it returns relative [x,y,z].
- Groups:
- GUI Control
Syntax
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
Bottom Section
- Posted on May 22, 2017 - 23:02 (UTC)
- Lucian
- If the ctrl is part of a CtrlGroup the returned position is relative to the ctrlGroups position.
- 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.