ctrlPosition: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
Lou Montana (talk | contribs) m (Text replacement - "<code>_([a-zA-Z0-9_]+) = \[\[([a-zA-Z0-9]+)\]\] _([a-zA-Z0-9_]+);?<\/code>" to "<sqf>_$1 = $2 _$3;</sqf>") |
||
Line 26: | Line 26: | ||
|r1= [[Array]] in format {{ic|[x, y, w, h]}} (2D) or {{ic|[x, y, z]}} (3D) | |r1= [[Array]] in format {{ic|[x, y, w, h]}} (2D) or {{ic|[x, y, z]}} (3D) | ||
|x1= < | |x1= <sqf>_pos = ctrlPosition _control;</sqf> | ||
|seealso= [[ctrlCreate]] [[ctrlDelete]] [[ctrlModel]] [[ctrlSetModel]] [[ctrlSetPosition]] [[ctrlClassName]] [[displayCtrl]] [[ctrlModelScale]] [[ctrlSetModelScale]] [[ctrlModelDirAndUp]] [[ctrlSetModelDirAndUp]] | |seealso= [[ctrlCreate]] [[ctrlDelete]] [[ctrlModel]] [[ctrlSetModel]] [[ctrlSetPosition]] [[ctrlClassName]] [[displayCtrl]] [[ctrlModelScale]] [[ctrlSetModelScale]] [[ctrlModelDirAndUp]] [[ctrlSetModelDirAndUp]] |
Revision as of 21:24, 7 May 2022
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:
Additional Information
- See also:
- ctrlCreate ctrlDelete ctrlModel ctrlSetModel ctrlSetPosition ctrlClassName displayCtrl ctrlModelScale ctrlSetModelScale ctrlModelDirAndUp ctrlSetModelDirAndUp
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.
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: GUI Control - Positioning