Unigine.WidgetLabel Class
Inherits: | Widget |
This class creates a text label.
The following sample demonstrates the usage of the WidgetLabel class:
WidgetLabel Class
Members
static WidgetLabel(Gui gui, string str = 0)
Constructor. Creates a new text label.Arguments
- Gui gui - GUI, to which the new label will belong.
- string str - Text of the label. This is an optional parameter.
WidgetLabel cast(Widget widget)
Casts a WidgetLabel out of the Widget instance.Arguments
- Widget widget - Widget instance.
Return value
WidgetLabel instance.void setText(string text)
Sets a text for the label.Arguments
- string text - Label text.
string getText()
Returns the text of the label.Return value
Label text.void setTextAlign(int align)
Sets alignment of the label.Arguments
- int align - One of the following variables:
int getTextAlign()
Returns alignment of the label.Return value
Alignment of the label: one of the Gui:: Enumeration with ALIGN_* prefixes.int type()
WidgetLabel type.Return value
WidgetLabel type identifier.Last update: 2018-08-10
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)