Arma 3 Scripting

ctrlPosition

  • Arma 3 v0.50
  • First in Armed Assault v1.00

Command · Markdown · JSON · 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