Unigine.WidgetButton Class
Inherits: | Widget |
Interface for widget button handling.
See Also#
- UnigineScript API sample <UnigineSDK>/data/samples/widgets/button_00
WidgetButton Class
Properties
string Text#
The button text label.
set
Sets a button text label.
set value -
Button label.
int TextAlign#
Alignment of the button label.
set
Sets alignment of the button label.
set value -
One of the GUI_ALIGN_* pre-defined variables.
string Texture#
The path to the button image texture.
set
Sets a button image texture.
set value -
Path to a texture file.
bool IsToggled#
A value indicating if the toggle button is pressed.
set
Sets a state of the toggle button.
set value -
Positive number to press the button, 0 to release it.
bool IsToggleable#
A value indicating if the button is a toggle button or a simple one. the default is 0.
set
Sets a value indicating if the button is a toggle button or a simple one.
set value -
Positive number to make the button a toggle button, 0 to make it a simple one.
int Background#
A value indicating if a background texture is rendered for the button. the default is 1.
set
Sets a value indicating if a background texture should be rendered for the button. By default, the background texture is always rendered. The default is 1.
set value -
Positive number to render a background texture, 0 not to render.
Members
static WidgetButton ( Gui gui, string str = 0 ) #
Constructor. Creates a button with a given label.Arguments
- Gui gui - GUI, to which the new button will belong.
- string str - Button label. This is an optional parameter.
WidgetButton Cast ( Widget widget ) #
Casts a WidgetButton out of the Widget instance.Arguments
- Widget widget - Widget instance.
Return value
WidgetButton instance.void SetImage ( Image image ) #
Updates a button image.Arguments
- Image image - Image to set.
void GetImage ( Image image ) #
Returns the button image.Arguments
- Image image
int type ( ) #
WidgetButton type.Return value
WidgetButton type identifier.Last update:
2019-08-16
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)