ctrlSetPosition: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (see also) |
Killzone Kid (talk | contribs) (alt syntax) |
||
Line 10: | Line 10: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| controlName '''ctrlSetPosition''' [x, y | | controlName '''ctrlSetPosition''' [x, y] |= Syntax | ||
|p1= controlName: [[Control]] - 2D control|= Parameter 1 | |p1= controlName: [[Control]] - 2D control|= Parameter 1 | ||
|p2= [x, y | |p2= [x, y]: [[Array]] |= Parameter 2 | ||
| [[Nothing]] |= Return value | | [[Nothing]] |= Return value | ||
| | | s2= controlName '''ctrlSetPosition''' [x, y, w, h] |= Syntax | ||
|p22= [x, y, | |p21= controlName: [[Control]] - 2D control|= Parameter 1 | ||
|p22= [x, y, w, h]: [[Array]] |= Parameter 2 | |||
| r2= [[Nothing]] |= Return value | | r2= [[Nothing]] |= Return value | ||
| s3= controlName '''ctrlSetPosition''' [x, y, z] |= Syntax | |||
|p41= controlName: [[Control]] - 3D control|= Parameter 1 | |||
|p42= [x, y, z]: [[Array]] - y is distance from the screen |= Parameter 2 | |||
| r3= [[Nothing]] |= Return value | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= Move control: <code>_control2D [[ctrlSetPosition]] [0, 0]; | |||
_control2D [[ctrlCommit]] 0;</code> |= Example 1 | |||
| | |x2= Move control and resize:<code>_control2D [[ctrlSetPosition]] [0, 0, 1, 1]; | ||
_control2D [[ctrlCommit]] 0;</code> |= Example 1 | _control2D [[ctrlCommit]] 0;</code> |= Example 1 | ||
| | |x3= <code>_control3D [[ctrlSetPosition]] [0.5, 1, 0.5]; //centered and 1m away from screen</code> |= Example 1 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 16:02, 18 April 2015
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 1
- Syntax:
- controlName ctrlSetPosition [x, y]
- Parameters:
- controlName: Control - 2D control
- [x, y]: Array
- Return Value:
- Nothing
Syntax 2
- Syntax:
- controlName ctrlSetPosition [x, y, w, h]
- Parameters:
- controlName: Control - 2D control
- [x, y, w, h]: Array
- Return Value:
- Nothing
Syntax 3
- Syntax:
- controlName ctrlSetPosition [x, y, z]
- Parameters:
- controlName: Control - 3D control
- [x, y, z]: Array - y is distance from the screen
- Return Value:
- Nothing
Examples
- Example 1:
- Move control:
_control2D ctrlSetPosition [0, 0]; _control2D ctrlCommit 0;
- Example 2:
- Move control and resize:
_control2D ctrlSetPosition [0, 0, 1, 1]; _control2D ctrlCommit 0;
- Example 3:
_control3D ctrlSetPosition [0.5, 1, 0.5]; //centered and 1m away from screen
Additional Information
- See also:
- ctrlCreatectrlDeletectrlModelctrlSetModelctrlPositionctrlClassNamedisplayCtrlctrlModelScalectrlSetModelScalectrlModelDirAndUpctrlSetModelDirAndUp
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)