This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

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
Build: ()