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

755 B

changeText

Changes the text while animation is running

Parameters:

  1. table multiple text strings - example: {"i", "am", "groot"}
  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):changeText({"i", "am", "groot"}, 2):play()
<animation object="buttonToAnimate" play="true">
    <text>
        <text>i</text>
        <text>am</text>
        <text>groot</text>
        <duration>2</duration>
    </text>
</animation>