This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
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
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::UserInterface Class

Header:#include <UnigineUserInterface.h>

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

UserInterface Class

Members


static UserInterfacePtr create(const Ptr<Gui> & gui, const char * name, const char * prefix = 0)

Arguments

  • const Ptr<Gui> & gui
  • const char * name
  • const char * 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(const char * name, int callback, const Ptr<Callback0> & func)

Arguments

  • const char * name
  • int callback
  • const Ptr<Callback0> & func

void setCallback1(const char * name, int callback, const Ptr<Callback1> & func)

Arguments

  • const char * name
  • int callback
  • const Ptr<Callback1> & func

void setCallback2(const char * name, int callback, const Ptr<Callback2> & func)

Arguments

  • const char * name
  • int callback
  • const Ptr<Callback2> & func

void setCallback3(const char * name, int callback, const Ptr<Callback3> & func)

Arguments

  • const char * name
  • int callback
  • const Ptr<Callback3> & func

const char * getCallbackInstanceData(int num, int callback)

Returns the callback instance data.

Arguments

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

Return value

Callback instance data.

const char * 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.

const char * getCallbackStringData(int num, int callback)

Returns the callback string data.

Arguments

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

Return value

Callback string data.

const char * getCallbackVariableData(int num, int callback)

Returns the callback variable data.

Arguments

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

Return value

Callback variable data.

Ptr<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()

Ptr<Widget> getWidget(int num)

Returns pointer to the widget with a given number.

Arguments

  • int num - Widget number.

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 number.

Return value

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

const char * getWidgetName(int num)

Returns widget name by its number.

Arguments

  • int num - Widget number.

Return value

Widget name.

const char * getWidgetNext(int num)

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

Arguments

  • int num - Current widget number.

Return value

Next Widget name.

int findWidget(const char * name)

Searches a widget by its name.

Arguments

  • const char * name - Widget name.

Return value

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

void grab()

void release()

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