This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

WidgetDialog Class

This class creates a dialog window.

Notice
When pressing ESC, the Close button will be pressed instead of the Cancel button if it is active.

WidgetDialog Class

This class inherits from WidgetWindow

Members


WidgetDialog (Gui gui, string str = 0, int x = 0, int y = 0)

Constructor. Creates a dialog window with given parameters.

Arguments

  • Gui gui - GUI, to which the dialog will belong.
  • string str - Window title. This is an optional parameter.
  • int x - Horizontal space between widgets in the window and between them and the window border. This is an optional parameter.
  • int y - Vertical space between widgets in the window and between them and the window border. This is an optional parameter.

WidgetButton getCancelButton ()

Returns the button that cancels an action.

Return value

Cancel button.

string getCancelText ()

Returns the caption of the cancel button. The default is Cancel.

Return value

Cancel button caption.

WidgetButton getCloseButton ()

Returns the button that closes an action.

Return value

Close button.

string getCloseText ()

Returns a caption of the close button. By default, it is empty.

Return value

Close button caption.

WidgetButton getOkButton ()

Returns the button that approves an action.

Return value

Ok button.

string getOkText ()

Returns the caption of the Ok button. The default is Ok.

Return value

Ok button caption.

int getResult ()

Returns a value indicating which button has been clicked.

Return value

1 if the Ok button is clicked; -1 if the cancel button is clicked; 0 if the close button is clicked.

int isCancelClicked ()

Returns a value indicating if the cancel button is clicked.

Return value

1 if the cancel button is clicked; otherwise, 0.

int isCloseClicked ()

Returns a value indicating if the close button is clicked.

Return value

1 if the close button is clicked; otherwise, 0.

int isDone ()

Returns a value indicating if the dialog window is closed.

Return value

1 if the dialog window is closed; otherwise, 0.

int isOkClicked ()

Returns a value indicating if the Ok button is clicked.

Return value

1 if the Ok button is clicked; otherwise, 0.

void setCancelText (string caption)

Sets a caption of the cancel button.

Arguments

  • string caption - Cancel button caption.

void setCloseText (string caption)

Sets a caption of the close button.

Arguments

  • string caption - Close button caption to set.

void setOkText (string caption)

Sets a caption of the Ok button.

Arguments

  • string caption - Ok button caption.
Last update: 03.07.2017
Build: ()