This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
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
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine::WidgetDialog Class

Header: #include <UnigineWidgets.h>
Inherits from: WidgetWindow

This class creates a dialog window.

See Also#

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

WidgetDialog Class

Members


static WidgetDialogPtr create ( const Ptr<Gui> & gui, const char * str = 0, int x = 0, int y = 0 ) #

Constructor. Creates a dialog window with given parameters and adds it to the specified GUI.

Arguments

  • const Ptr<Gui> & gui - GUI, to which the dialog will belong.
  • const char * 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.

static WidgetDialogPtr create ( const char * str = 0, int x = 0, int y = 0 ) #

Constructor. Creates a dialog window with given parameters and adds it to the Engine GUI.

Arguments

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

Ptr<WidgetButton> getCancelButton ( ) const#

Returns the button that cancels an action.

Return value

Cancel button.

int isCancelClicked ( ) const#

Returns a value indicating if the Cancel button is clicked.

Return value

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

void setCancelText ( const char * text ) #

Sets a caption of the Cancel button.

Arguments

  • const char * text - Cancel button caption.

const char * getCancelText ( ) const#

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

Return value

Cancel button caption.

Ptr<WidgetButton> getCloseButton ( ) const#

Returns the button that closes an action.

Return value

Close button.

int isCloseClicked ( ) const#

Returns a value indicating if the Close button is clicked.

Return value

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

void setCloseText ( const char * text ) #

Sets a caption of the Close button.

Arguments

  • const char * text - Close button caption.

const char * getCloseText ( ) const#

Returns the caption of the Close button. The default is empty.

Return value

Close button caption.

bool isDone ( ) const#

Returns a value indicating if the dialog window is closed.

Return value

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

Ptr<WidgetButton> getOkButton ( ) const#

Returns the button that approves an action.

Return value

OK button.

bool isOkClicked ( ) const#

Returns a value indicating if the OK button is clicked.

Return value

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

void setOkText ( const char * text ) #

Sets a caption of the OK button.

Arguments

  • const char * text - OK button caption.

const char * getOkText ( ) const#

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

Return value

OK button caption.

int getResult ( ) const#

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.
Last update: 26.09.2022
Build: ()