WidgetLabel Class
Interface for widget label handling. See also UnigineScript analog.
To use this class, include the UnigineWidgetLabel.h file.
WidgetLabel Class
Members
WidgetLabel (const Ptr<Gui> & gui, const char * str = 0)
Constructor. Creates a new text label.Arguments
- const Ptr<Gui> & gui - GUI, to which the new label will belong.
- const char * str - Text of the label. This is an optional parameter.
int type ()
WidgetLabel type.Return value
WidgetLabel type identifier.Ptr<WidgetLabel> create (const Ptr<Widget> & widget)
WidgetLabel constructor.Arguments
- const Ptr<Widget> & widget - Widget smart pointer.
Return value
void setText (const char * text)
Sets a text for the label.Arguments
- const char * text - Label text.
int getTextAlign ()
Returns alignment of the label.Return value
Alignment of the label: one of the Gui:: Enumeration with ALIGN_* prefixes.const char * 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 Gui:: Enumeration with ALIGN_* prefixes.
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)