Files
Basalt/docs/objects/Animation/changeBackground.md
Robert Jelic 4d614372a1 Updated docs
There is still stuff to do
2022-08-28 18:18:26 +02:00

849 B

changeBackground

Changes the background color while the animation is running

Parameters:

  1. table multiple color numbers - example: {colors.red, colors.yellow, colors.green}
  2. number duration in seconds
  3. number time - time when this part should begin (offset to when the animation starts - default 0)

Returns:

  1. animation Animation in use

Usage:

local mainFrame = basalt.createFrame()
local testButton = mainFrame:addButton("buttonToAnimate")
local aAnimation = mainFrame:addAnimation():setObject(testButton):changeTextColor({colors.red, colors.yellow, colors.green}, 2):play()
<animation object="buttonToAnimate" play="true">
    <background>
        <color>red</color>
        <color>yellow</color>
        <color>green</color>
        <duration>2</duration>
    </background>
</animation>