Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:WindowStopPositionAnimation

From RoR Wiki

UI Lua API · Window functions
Version: WAR 1.4.8

Stops a window's position animation.

WindowStopPositionAnimation(windowName)

Arguments

windowName
string – Name of the window.

Returns

Nothing.

Details

  • Stops the animation started with WindowStartPositionAnimation.
  • For the animation types SINGLE, LOOP, REPEAT, POP and POP_AND_EASE, the window goes back to the offset it had when the animation was started. For the other types it stays where it is.
  • If the window has no position animation, nothing happens.

Errors

  • Error in function call 'WindowStopPositionAnimation': Window %s does not exist
  • Error in function call 'WindowStopPositionAnimation': Window %s is currently locked and may not be modified from lua. ...
    This check never triggers in the current client. See WindowSetShowing.

Example

Restarting a looping slider animation, from ea_craftingwindow/source/apothecarywindow.lua:

function ApothecaryWindow.UpdateStabilityAnimation()
    WindowStopPositionAnimation( windowName.."StabilityMeterSlider" )

    local currentAnimationPoints = ApothecaryWindow.stabilityAnimationPoints[ApothecaryWindow.stabilityCurrentState]

    WindowStartPositionAnimation( windowName.."StabilityMeterSlider",
                                  Window.AnimationType.LOOP,
                                  currentAnimationPoints.startX,
                                  currentAnimationPoints.startY,
                                  currentAnimationPoints.stopX,
                                  currentAnimationPoints.stopY,
                                  ApothecaryWindow.stabilityAnimationDuration,
                                  false, 0, 0 )
end

See also