This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine 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
IG Plugin
CIGIConnector 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.

UserInterface Class

Warning
UnigineScript is deprecated and will be removed in future releases. Please consider using C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt is not guaranteed, as the current level of support assumes only fixing critical issues.

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

See Also#

  • C++ API sample <UnigineSDK>/source/samples/Api/Widgets/UserInterface
  • C# API sample <UnigineSDK>/source/csharp/samples/Api/Widgets/UserInterface

UserInterface Class

Members


int getCallback ( int num, int callback ) #

Returns the number of a given callback function.

Arguments

  • int num - Widget number.
  • int callback

Return value

Callback number.

string getCallbackInstanceData ( int num ) #

Returns the callback instance data.

Arguments

  • int num - Widget number.

Return value

Instance data.

string getCallbackName ( int num ) #

Returns the name of a given callback function.

Arguments

  • int num - Widget number.

Return value

Callback function name.

string getCallbackStringData ( int num ) #

Returns the callback string data.

Arguments

  • int num - Widget number.

Return value

Callback string data (i.e. string data specified in the string parameter of the callback).

string getCallbackVariableData ( int num ) #

Returns the callback variable data.

Arguments

  • int num - Widget number.

Return value

Callback variable data (i.e. string data specified in the variable parameter of the callback).

Widget getCallbackWidgetData ( int num ) #

Returns the callback widget data.

Arguments

  • int num - Widget number.

Return value

Widget data (i.e. reference to a widget specified in the widget parameter of the callback).

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 number of associated widgets.

Return value

Number of associated widgets.

Widget getWidget ( int num ) #

Returns reference to widget with the given ID.

Arguments

  • int num - Widget ID.

Return value

Reference to widget with the given ID.

int getWidgetExport ( int num ) #

Returns a value indicating if a given widget is exported into a script (has export="1" flag in UI file).

Arguments

  • int num - Widget ID.

Return value

1 if the widget is exported; otherwise, 0.

string getWidgetName ( int num ) #

Returns widget name by ID.

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

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 updateWidgets ( ) #

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