ctrlMapSetPosition: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
Lou Montana (talk | contribs) m (Text replacement - "<code>([a-zA-Z0-9_, ]+) +\[\[([a-zA-Z0-9_]+)\]\] +(\[[a-zA-Z0-9_, ]+\]);?<\/code>" to "<sqf>$1 $2 $3;</sqf>") |
||
Line 20: | Line 20: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf>_map ctrlMapSetPosition [0,0,1,1];</sqf> | ||
|x2= <code>_map [[ctrlSetPosition]] [0.5, 0.5, 0.5, 0.5]; | |x2= <code>_map [[ctrlSetPosition]] [0.5, 0.5, 0.5, 0.5]; |
Revision as of 13:23, 5 May 2022
Description
- Description:
- Sets position and size of the given map control and recalculates control center. The effect is immediate and no ctrlCommit is necessary, unlike with ctrlSetPosition command.
- Groups:
- GUI Control - Map
Syntax
- Syntax:
- map ctrlMapSetPosition [x, y, w, h]
- Parameters:
- map: Control - Map control
- [x, y, w, h]: Array
- x: Number - (Optional) Left top x of map control
- y: Number - (Optional) Left top y of map control
- w: Number - (Optional) Width of map control
- h: Number - (Optional) Height of map control
- Return Value:
- Nothing
Examples
- Example 1:
- _map ctrlMapSetPosition [0,0,1,1];
- Example 2:
_map ctrlSetPosition [0.5, 0.5, 0.5, 0.5]; _map ctrlCommit 0; _map ctrlMapSetPosition []; // Sync
- Example 3:
with localNamespace do { private _display = findDisplay 46 createDisplay "RscDisplayEmpty"; private _ctrlGroup = _display ctrlCreate ["RscControlsGroup", -1]; private _ctrlText = _display ctrlCreate ["RscText", -1, _ctrlGroup]; _ctrltext ctrlSetPosition [0, 0, 1, 1]; _ctrlText ctrlSetBackgroundColor [1, 0, 0, 0.5]; _ctrlText ctrlCommit 0; private _ctrlMap = _display ctrlCreate ["RscMapControl", -1, _ctrlGroup]; _ctrlMap ctrlMapSetPosition [0, 0, 0.5, 0.5]; // effect is immediate _ctrlMap ctrlMapAnimAdd [0, ctrlMapScale _ctrlMap, player]; ctrlMapAnimCommit _ctrlMap; _ctrlGroup ctrlSetPosition [safeZoneX, safeZoneY, 1, 1]; _ctrlGroup ctrlCommit 0.3; // non instant transition _ctrlMap ctrlMapSetPosition []; // Instant sync to new _ctrlGroup position };
Additional Information
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