DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ShowDialog()

proto native void UIManager::ShowDialog ( string caption,
string text,
int id,
int butts,
int def,
int type,
UIScriptedMenu handler )
private

Shows message dialog.

Аргументы
caption
text
idcustom user id
buttsDialogBoxType
defDialogBoxButton
typeDialogMessageType
handler
usage :
const int QUIT_DIALOG_ID = 76;
GetGame().GetUIManager().ShowDialog("Quit", "Do You really want to quit?", QUIT_DIALOG_ID, DBT_YESNO, DBB_YES, DMT_QUESTION, this);
...
// after user pass dialog, callback on menu/event handler is called
ScriptedWidgetEventHandler::OnModalResult( Widget w, int x, int y, int code, int result )
{
if (code == QUIT_DIALOG_ID && result == DBB_YES) // yes this is callback for dialog we show earlier and user press YES button
{
Quit();
}
}
Icon x
Icon y
proto native UIManager GetUIManager()
proto native void ShowDialog(string caption, string text, int id, int butts, int def, int type, UIScriptedMenu handler)
Shows message dialog.
Определения EnWidgets.c:190
proto native CGame GetGame()

Используется в UIScriptedMenu::Exit(), HandleError(), UIScriptedMenu::Init(), OnlineServices::OnAutoConnectToEmptyServer(), ScriptedWidgetEventHandler::OnClick(), UIScriptedMenu::OnClick(), UIScriptedMenu::OnClick_Respawn() и UIScriptedMenu::Play().