11 protected ButtonWidget
m_Back;
35 m_Apply = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"apply"));
36 m_Back = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"back"));
37 m_Undo = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"undo"));
38 m_Defaults = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"reset"));
39 m_HardReset = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"reset_all"));
41 layoutRoot.FindAnyWidget(
"Tabber").GetScript(
m_Tabber);
45 #ifdef PLATFORM_CONSOLE
46 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
48 version =
"#main_menu_version" +
" " + version;
53 string back =
"circle";
57 ImageWidget toolbar_b = ImageWidget.Cast(layoutRoot.FindAnyWidget(
"BackIcon"));
58 toolbar_b.LoadImageFile(0,
"set:playstation_buttons image:" + back);
65 InitPresets(-1, layoutRoot.FindAnyWidget(
"group_header"), input);
69 g_Game.SetKeyboardHandle(
this);
85 for (
int i = 0; i < sort_count; i++)
90 group_name =
Widget.TranslateString(
"#" + group_name);
97 m_Tabber.AddTab(
Widget.TranslateString(
"#layout_pc_keybinding_unsorted"));
104 m_GroupsContainer =
new KeybindingsContainer(-1,
GetGame().GetInput(),layoutRoot.FindAnyWidget(
"TabContentsHolder"),
this);
172 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
249 g_Game.GetUIManager().ShowDialog(
"#main_menu_configure",
"#main_menu_configure_desc",
MODAL_ID_BACK, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
270 g_Game.GetUIManager().ShowDialog(
"#menu_default_cap",
"#menu_default_desc",
MODAL_ID_DEFAULT, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
275 g_Game.GetUIManager().ShowDialog(
"#menu_default_cap",
"#menu_default_all_desc",
MODAL_ID_DEFAULT_ALL, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
303 if (result == DBB_YES)
312 if (result == DBB_YES)
320 if (result == DBB_YES)
327 if (result == DBB_YES)
342 #ifdef PLATFORM_CONSOLE
343 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
345 version =
"#main_menu_version" +
" " + version;
379 return super.OnMouseWheel(w,
x,
y, wheel);
423 ButtonWidget button = ButtonWidget.Cast(w);
424 if (button && button !=
m_Apply)
426 button.SetTextColor(
ARGB(255, 200, 0, 0));
432 #ifdef PLATFORM_WINDOWS
436 ButtonWidget button = ButtonWidget.Cast(w);
452 #ifdef PLATFORM_WINDOWS
456 ButtonWidget button = ButtonWidget.Cast(w);
470 Widget kb_root = parent.FindAnyWidget(
"keyboard_dropown");
482 opt1.Insert(profile_text);
487 m_PresetSelector =
new OptionSelectorMultistate(layoutRoot.FindAnyWidget(
"profile_setting_option"), current_idx, null,
false, opt1);
499 g_Game.GetUIManager().ShowDialog(
"#main_menu_configure",
"#main_menu_configure_desc",
MODAL_ID_PRESET_CHANGE, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
proto native UIManager GetUIManager()
override ScriptCallQueue GetCallQueue(int call_category)
proto native WorkspaceWidget GetWorkspace()
proto void GetVersion(out string version)
proto native Input GetInput()
proto native Mission GetMission()
static int COLOR_NORMAL_TEXT
static int COLOR_DISABLED_TEXT
ScriptInvoker GetOnInputPresetChanged()
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto void Invoke(void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
invoke call on all inserted methods with given arguments
bool Back()
Close top window on windows stack, returns true when any window is closed.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
int ARGB(int a, int r, int g, int b)