Text#
- class UI.Text()#
A text label. Added to a
UI.Canvasor aUI.Panel.Base class:UI.ObjectInherited Members
- Text.getContent()#
- Text.setContent(value)#
The text string
- Property:
Can be read or written
- Return type:
string
- Text.getWordWrap()#
- Text.setWordWrap(value)#
Whether the text wraps onto further lines when it is wider than the space it has. Text that does not wrap carries on past the edge, and its preferred size is that of a single line, so a changing value leaves a layout in place.
- Property:
Can be read or written
- Return type:
boolean
- Text.getFont()#
- Text.setFont(value)#
Name of the font
- Property:
Can be read or written
- Return type:
string
Note
Empty if the game provided no font to draw the text with, in which case it is not drawn. See
UI.Text.getAvailableFonts()for the names that can be set.
- Text.getAvailableFonts()#
A list of all available fonts.
- Property:
Read-only, cannot be set
- Return type:
Arrayofstring
- Text.getSize()#
- Text.setSize(value)#
Font size.
- Property:
Can be read or written
- Return type:
number
- Text.getColor()#
- Text.setColor(value)#
The color the text is drawn in.
- Property:
Can be read or written
- Return type:
- class UI.FontStyle()#
Font style.
- FontStyle.normal#
Normal.
- FontStyle.bold#
Bold.
- FontStyle.italic#
Italic.
- FontStyle.boldAndItalic#
Bold and italic.
- class UI.TextAlignment()#
Text alignment.
- TextAlignment.left#
Left aligned.
- TextAlignment.right#
Right aligned.
- TextAlignment.center#
Center aligned.
- class UI.TextAnchor()#
Text alignment.
- TextAnchor.lowerCenter#
Lower center.
- TextAnchor.lowerLeft#
Lower left.
- TextAnchor.lowerRight#
Lower right.
- TextAnchor.middleCenter#
Middle center.
- TextAnchor.middleLeft#
Middle left.
- TextAnchor.middleRight#
Middle right.
- TextAnchor.upperCenter#
Upper center.
- TextAnchor.upperLeft#
Upper left.
- TextAnchor.upperRight#
Upper right.