The Text class¶
This class is used to display text on the screen outside of the text window.
Objects of this class behave like sprites, which means you can use methods like move to animate them.
Properties¶
| Type | Name | Default value | Description |
|---|---|---|---|
| string | ellipsis | “…” | Sets the ellipsis string to use when the text is truncated |
| number | spacing | 0 | Sets the spacing of the lines |
The Text class inherits all of the properties of the Sprite class.
Member functions¶
| Method | Description |
|---|---|
| (constructor) | Create a Text object |
| setText | Set the text to display |
| setMaxSize | Set the maximum size of the text box |
| getCurrentTextSize | Get the size of the text currently being displayed |
The Text class inherits all of the methods of the Sprite class except defineSpriteSheet and setFrame.