ctrlSetPosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|game([0-9]) ?= (.+) \|version([0-9]) ?= (.+) " to "|game$1= $2 |version$3= $4 ")
No edit summary
Line 19: Line 19:


|descr= 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. If target control is inside a [[CT_CONTROLS_GROUP]], the position needs to be relative to it.
|descr= 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. If target control is inside a [[CT_CONTROLS_GROUP]], the position needs to be relative to it.
{{Feature|Important| This command doesn't work well with [[CT_MAP]] control. Use [[ctrlMapSetPosition]] instead.


|s1= controlName '''ctrlSetPosition''' [x, y]
|s1= controlName '''ctrlSetPosition''' [x, y]
Line 105: Line 107:
};</code>
};</code>


|seealso= [[ctrlCommit]] [[ctrlCreate]] [[ctrlDelete]] [[ctrlModel]] [[ctrlSetModel]] [[ctrlPosition]] [[ctrlClassName]] [[displayCtrl]] [[ctrlModelScale]] [[ctrlSetModelScale]] [[ctrlModelDirAndUp]] [[ctrlSetModelDirAndUp]]
|seealso= [[ctrlMapSetPosition]], [[ctrlCommit]] [[ctrlCreate]] [[ctrlDelete]] [[ctrlModel]] [[ctrlSetModel]] [[ctrlPosition]] [[ctrlClassName]] [[displayCtrl]] [[ctrlModelScale]] [[ctrlSetModelScale]] [[ctrlModelDirAndUp]] [[ctrlSetModelDirAndUp]]
}}
}}



Revision as of 10:20, 24 May 2021

{{RV|type=command

|game1= arma1 |version1= 1.00

|game2= arma2 |version2= 1.00

|game3= arma2oa |version3= 1.50

|game4= tkoh |version4= 1.00

|game5= arma3 |version5= 0.50

|gr1= GUI Control - Positioning

|descr= 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. If target control is inside a CT_CONTROLS_GROUP, the position needs to be relative to it.

This command doesn't work well with CT_MAP control. Use ctrlMapSetPosition instead.
Posted on July 20, 2017 - 11:56 (UTC)
Yuval
If the target control is a controls' group, all the child controls of that group will be moved automatically (as their position is relative to the control group rather than the display)