Files
Basalt/docs/docs1_6/objects/Animation/changeText.md
Robert Jelic d4c72514ef Docs 1.6
Accidentally uploaded outdated 1.6 docs
2023-05-01 16:28:46 +02:00

818 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)
  4. ... multiple text strings - example: "i", "am", "groot"

Returns:

  1. animation Animation in use

Usage:

local mainFrame = basalt.createFrame()
local testButton = mainFrame:addButton("buttonToAnimate")
local aAnimation = mainFrame:addAnimation():setObject(testButton):changeText(2, 0, "i", "am", "groot"):play()
<animation object="buttonToAnimate" play="true">
    <text>
        <text>i</text>
        <text>am</text>
        <text>groot</text>
        <duration>2</duration>
    </text>
</animation>