3 void ScriptConsoleRenamePresetDialog()
8 void ~ScriptConsoleRenamePresetDialog()
14 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/script_console/script_console_dialog_preset.layout");
15 m_Editbox =
EditBoxWidget.Cast( layoutRoot.FindAnyWidget(
"PrimaryEditBox") );
16 m_Label =
TextWidget.Cast( layoutRoot.FindAnyWidget(
"WindowLabel") );
17 m_Message =
TextWidget.Cast( layoutRoot.FindAnyWidget(
"MessageText") );
22 if ( ui_menu != NULL )
24 ScriptConsole scripted_console = ScriptConsole.Cast( ui_menu );
28 m_Editbox.SetText( tab.GetCurrentPresetName() );
29 m_Label.SetText(
"RENAME PRESET");
30 m_Message.SetText( tab.GetCurrentPresetName() );
39 super.OnClick(w,
x,
y, button);
41 if (w.GetUserID() ==
IDC_OK)
44 if ( ui_menu != NULL )
46 ScriptConsole scripted_console = ScriptConsole.Cast( ui_menu );
50 tab.RenamePreset( m_Editbox.GetText() );