ctrlSetPosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(expanded to include info on 3d control)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Sets wanted position and size for control animation.
| Sets wanted position and size for 2D control animation. Width and height are optional. [[ctrlCommit]] is required to complete the operation. For 3D control, param is relative [x,y,z] and no [[ctrlCommit]] is required as it cannot be animated. |= Description
 
Width and height are optional. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 19: Line 17:


| [[Nothing]] |= Return value
| [[Nothing]] |= Return value
| s2= controlName '''ctrlSetPosition''' [x, y, z] |= Syntax
|p21=  controlName: [[Control]] |= Parameter 1
|p22= [x, y, z]: [[Array]] |= Parameter 2
| r2= [[Nothing]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <pre>_control ctrlSetPosition [0.5, 0.5]</pre> |= Example 1
|x1= <code>_control2D [[ctrlSetPosition]] [0, 0, 1, 1];
_control2D [[ctrlCommit]] 0;</code> |= Example 1
 
|x2= <code>_control3D [[ctrlSetPosition]] [0.5, 0.5, 1];</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 20:57, 21 August 2014

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Sets wanted position and size for 2D control animation. Width and height are optional. ctrlCommit is required to complete the operation. For 3D control, param is relative [x,y,z] and no ctrlCommit is required as it cannot be animated.
Groups:
Uncategorised

Syntax

Syntax:
controlName ctrlSetPosition [x, y, w, h]
Parameters:
controlName: Control
[x, y, w, h]: Array
Return Value:
Nothing

Alternative Syntax

Syntax:
controlName ctrlSetPosition [x, y, z]
Parameters:
controlName: Control
[x, y, z]: Array
Return Value:
Nothing

Examples

Example 1:
_control2D ctrlSetPosition [0, 0, 1, 1]; _control2D ctrlCommit 0;
Example 2:
_control3D ctrlSetPosition [0.5, 0.5, 1];

Additional Information

See also:
ctrlPosition

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

Posted on January 27, 2007 - 19:13
Giova
IMPORTANT You have to use ctrlCommit command to apply this effect(Arma v1.02.5103GER)

Bottom Section