Arma 3 Scripting

Command in GUI Control - Positioning

ctrlPosition

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns the current position of 2D control as [x, y, w, h] array. For 3D control it returns relative [x, z, y].

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.

Syntax

ctrlPosition controlName

Parameters:

Returns: Array format [x, y, w, h] (2D) or [x, z, y] (3D)

Examples

Example 1

_pos = ctrlPosition _control;

See also

ctrlCreate · ctrlDelete · ctrlModel · ctrlSetModel · ctrlSetPosition · ctrlClassName · displayCtrl · ctrlModelScale · ctrlSetModelScale · ctrlModelDirAndUp · ctrlSetModelDirAndUp