ctrlPosition

From Bohemia Interactive Community
Revision as of 09:46, 23 October 2022 by Larrow (talk | contribs)
Jump to navigation Jump to search
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 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:
_pos = ctrlPosition _control;

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
Unknown author - view page history
Date unknown
-no text defined-