UI.Animation

From GiderosMobile
Revision as of 13:13, 13 October 2023 by MoKaLux (talk | contribs)


Description

Animates any given UI.

UI.Animation:animate(widget,channel,animation,duration,parameters)

animation can be any of the following:

  • UI.Animation.AnchorMove, params: x, y
  • UI.Animation.Alpha
  • UI.Animation.AnchorScale

parameters can be any of the following:

  • onStop: a function to call when animation has finished
  • easing: with a type and a way
    • type: linear, quad, cubic, quart, quint, expo, sine, circ, back, steps, elastic, bounce, slowmo
    • way: out, inout, outin

Parameters

widget: (sprite) the widget to animate
channel: (string) the animation channel
animation: (class) one of the available animation
duration: (number) the animation duration
parameters: (table) additional animation parameters optional

Examples