Description
Translates, scales (with pivot) and fades a picture control over time.
Syntax
[picture, scaleFactor, pivot, translation, durationOrSpeed, isDuration, fade] call BIS_fnc_scaleAndTranslate
Parameters:
picture: Control - picture that has to be modifiedscaleFactor: Number - (Optional, default 1) how much the picture has to be scaled (> 1 makes it bigger, 1 keeps it the same, < 1 makes it smaller)pivot: String - (Optional, default "center") select the pivot's position (i.e. center of the scaling process); can be one of:- "topLeft"
- "topCenter"
- "topRight"
- "centerLeft"
- "center"
- "centerRight"
- "bottomLeft"
- "bottomCenter"
- "bottomRight"
translation: Array format [x, y] - (Optional, default [0, 0]) how much the picture has to be moveddurationOrSpeed: Number - (Optional, default 2) either the duration of the animation(default) or the speed of the translation, depending on what the next parameter is set toisDuration: Boolean - (Optional, default true) if true, durationOrSpeed is considered duration; if false it is considered speedfade: Number - (Optional, default 0) transparency of the image at the end of the animation (in range 0..1: 0 = visible, 1 = invisible)
Returns: Number - duration of the animation; useful for determining how much sleep time is needed between animations
Examples
Example 1
[_controlFront, 0.8, "topLeft"] call BIS_fnc_scaleAndTranslate;
private _t = [_controlFront, 1, "bottomRight", [0.1, 0.1], 0.5, false] call BIS_fnc_scaleAndTranslate;
sleep (_t * 2);
[_controlFront, 0.8, "topRight", [0.5, 0.3]] call BIS_fnc_scaleAndTranslate;