API:WindowStartScaleAnimation
From RoR Wiki
UI Lua API · Window functions
Version: WAR 1.4.8
Starts an animation of a window's scale.
WindowStartScaleAnimation(windowName, animationType, startScale, endScale, duration, setStartBeforeDelay, delay, loopCount)
Arguments
- windowName
string– Name of the window.- animationType
number– How the scale changes over time. Use aWindow.AnimationTypeconstant; see WindowStartAlphaAnimation for the list.- startScale
number– Scale at the start of the animation.- endScale
number– Scale at the end of the animation.- duration
number– Length of one pass from start to end, in seconds.- setStartBeforeDelay
boolean–trueto applystartScalestraight away, during the delay.- delay
number– Seconds to wait before the animation starts.- loopCount
number– ForLOOPandREPEAT: how many passes to run. 0 runs until stopped.
Returns
Nothing.
Details
- The animation types, the delay, the loop count and the reset at the end work as described on WindowStartAlphaAnimation. "Original scale" for the resetting types is the window's scale when the animation was started.
- Each frame the scale is applied as with WindowSetScale, so all descendants get the same absolute scale.
- A window has at most one scale animation. Starting a new one stops the old one first.
animationTypeandloopCountare truncated to whole numbers.- The stock UI never calls
WindowStartScaleAnimation.
Errors
Error in function call 'WindowStartScaleAnimation': Window %s does not existError in function call 'WindowStartScaleAnimation': Window %s is currently locked and may not be modified from lua. ...
This check never triggers in the current client. See WindowSetShowing.
Example
A minimal example built from the signature above: grow a window to 1.2 times its size and back, three times, without a delay.
WindowStartScaleAnimation( "MyWindow", Window.AnimationType.LOOP, 1.0, 1.2, 0.25, false, 0, 3 )
