ctrlPosition: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "| arma |" to "| arma1 |") |
Lou Montana (talk | contribs) m (Fix note) |
||
(36 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma1 | | |game1= arma1 | ||
|version1= 1.00 | |||
|1.00 | |game2= arma2 | ||
|version2= 1.00 | |||
| | |game3= arma2oa | ||
|version3= 1.50 | |||
| | |game4= tkoh | ||
|version4= 1.00 | |||
| | |game5= arma3 | ||
|version5= 0.50 | |||
| | |gr1= GUI Control - Positioning | ||
| [[ | |descr= Returns the current position of 2D control as {{hl|[x, y, w, h]}} array. For 3D control it returns relative {{hl|[x, y, z]}}.<br> | ||
If the control is within a [[CT_CONTROLS_GROUP]], the returned position will be relative to the group's position.<br> | |||
If the control is a [[CT_CONTROLS_TABLE]] header or row the returned position is relative to the table's position. | |||
| | |s1= [[ctrlPosition]] controlName | ||
|p1= controlName: [[Control]] | |||
|r1= [[Array]] in format {{hl|[x, y, w, h]}} (2D) or {{hl|[x, y, z]}} (3D) | |||
< | |x1= <sqf>_pos = ctrlPosition _control;</sqf> | ||
</ | |||
|seealso= [[ctrlCreate]] [[ctrlDelete]] [[ctrlModel]] [[ctrlSetModel]] [[ctrlSetPosition]] [[ctrlClassName]] [[displayCtrl]] [[ctrlModelScale]] [[ctrlSetModelScale]] [[ctrlModelDirAndUp]] [[ctrlSetModelDirAndUp]] | |||
}} | |||
[[ | |||
[[ | |||
[[ | |||
[[ | |||
[[ | |||
Latest revision as of 11:28, 22 March 2024
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 within a CT_CONTROLS_GROUP, the returned position will be relative to the group's position.
If the control is a CT_CONTROLS_TABLE header or row the returned position is relative to the table'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
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