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
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.UserInterface Class

The class is used to work with widgets that are created by loading a UI file.

UserInterface Class

Members


static UserInterface(Gui gui, string name, string prefix = 0)

UserInterface constructor.

Arguments

  • Gui gui - GUI smart pointer.
  • string name - User interface name.
  • string prefix - Names prefix.

int getCallback(int num, int callback)

Returns the number of a given callback function.

Arguments

  • int num - Widget number.
  • int callback - Callback number.

Return value

Callback number.

void setCallback0(string name, int callback, Callback0 func)

Sets a callback function for the widget with the specified name.

Arguments

  • string name - Widget name.
  • int callback - Callback number.
  • Callback0 func - Callback pointer.

void setCallback1(string name, int callback, Callback1 func)

Sets a callback function for the widget with the specified name.

Arguments

  • string name - Widget name.
  • int callback - Callback number.
  • Callback1 func - Callback pointer.

void setCallback2(string name, int callback, Callback2 func)

Sets a callback function for the widget with the specified name.

Arguments

  • string name - Widget name.
  • int callback - Callback number.
  • Callback2 func - Callback pointer.

void setCallback3(string name, int callback, Callback3 func)

Sets a callback function for the widget with the specified name.

Arguments

  • string name - Widget name.
  • int callback - Callback number.
  • Callback3 func - Callback pointer.

string getCallbackInstanceData(int num, int callback)

Returns the callback instance data.

Arguments

  • int num - Widget number.
  • int callback - Callback number.

Return value

Callback instance data.

string getCallbackName(int num, int callback)

Returns the name of a given callback function.

Arguments

  • int num - Widget number.
  • int callback - Callback number.

Return value

Callback function name.

string getCallbackStringData(int num, int callback)

Returns the callback string data.

Arguments

  • int num - Widget number.
  • int callback - Callback number.

Return value

Callback string data.

string getCallbackVariableData(int num, int callback)

Returns the callback variable data.

Arguments

  • int num - Widget number.
  • int callback - Callback number.

Return value

Callback variable data.

Widget getCallbackWidgetData(int num, int callback)

Returns the callback widget data.

Arguments

  • int num - Widget number.
  • int callback - Callback number.

Return value

Widget data.

int getNumCallbacks(int num)

Returns the total number of callbacks for a given widget.

Arguments

  • int num - Widget number.

Return value

Number of callbacks.

int getNumWidgets()

Returns the number of associated widgets.

Return value

Number of associated widgets.

int isOwner()

Returns the owner flag. If the pointer is the owner, on its deletion the UserInterface also will be deleted. Use grab() and release() functions to change ownership.

Return value

1 if the pointer is the owner; otherwise, 0.

Widget getWidget(int num)

Returns pointer to the widget with a given number.

Arguments

  • int num - Widget ID.

Return value

Pointer to the widget with the given number.

int getWidgetExport(int num)

Returns a value indicating if a given widget is exported into a script.

Arguments

  • int num - Widget ID.

Return value

Returns 1 if the widget is exported; otherwise, 0.

string getWidgetName(int num)

Returns widget name by its number.

Arguments

  • int num - Widget ID.

Return value

Widget name.

string getWidgetNext(int num)

Returns the name of the widget, which will be focused next.

Arguments

  • int num - Widget number.

Return value

Next Widget name.

int findWidget(string name)

Searches a widget by its name.

Arguments

  • string name - Widget name.

Return value

Returns the number of the widget if exists; otherwise, -1.

void grab()

Sets the owner flag to 1 for the UserInterface pointer. The UserInterface should not be handled by the class after this function is called

void release()

Releases the UserInterface (sets the owner flag to 0 for the pointer). The UserInterface should be handled by the class after this function is called

void updateWidgets()

Updates all widgets belonging to the user interface. This function should be called, for example, after change of the interface language.
Last update: 2018-06-04
Build: ()