ctrlPosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (template:command argument fix)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


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


| '''ctrlPosition''' controlName|= Syntax
| '''ctrlPosition''' controlName|SYNTAX=


|p1= controlName: [[Control]] |= Parameter 1
|p1= controlName: [[Control]] |PARAMETER1=


| [[Array]] |= Return value
| [[Array]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_pos = [[ctrlPosition]] _control;</code> |= Example 1
|x1= <code>_pos = [[ctrlPosition]] _control;</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


|  [[ctrlCreate]], [[ctrlDelete]], [[ctrlModel]], [[ctrlSetModel]], [[ctrlSetPosition]], [[ctrlClassName]], [[displayCtrl]], [[ctrlModelScale]], [[ctrlSetModelScale]], [[ctrlModelDirAndUp]], [[ctrlSetModelDirAndUp]]  |= See also
|  [[ctrlCreate]], [[ctrlDelete]], [[ctrlModel]], [[ctrlSetModel]], [[ctrlSetPosition]], [[ctrlClassName]], [[displayCtrl]], [[ctrlModelScale]], [[ctrlSetModelScale]], [[ctrlModelDirAndUp]], [[ctrlSetModelDirAndUp]]  |SEEALSO=


}}
}}

Revision as of 15:36, 7 April 2019

-wrong parameter ("Arma") defined!-1.00
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].
Groups:
Uncategorised

Syntax

Syntax:
ctrlPosition controlName
Parameters:
controlName: Control
Return Value:
Array

Examples

Example 1:
_pos = ctrlPosition _control;

Additional Information

See also:
ctrlCreatectrlDeletectrlModelctrlSetModelctrlSetPositionctrlClassNamedisplayCtrlctrlModelScalectrlSetModelScalectrlModelDirAndUpctrlSetModelDirAndUp

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

Notes

Bottom Section

Posted on May 22, 2017 - 23:02 (UTC)
Lucian
If the ctrl is part of a CtrlGroup the returned position is relative to the ctrlGroups position.