11 protected ButtonWidget
m_Back;
32 #ifdef PLATFORM_MSSTORE
33 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/options/msstore/keybinding_menu.layout", null);
35 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/options/pc/keybinding_menu.layout", null);
39 m_Apply = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"apply"));
40 m_Back = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"back"));
41 m_Undo = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"undo"));
42 m_Defaults = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"reset"));
43 m_HardReset = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"reset_all"));
45 layoutRoot.FindAnyWidget(
"Tabber").GetScript(
m_Tabber);
48 g_Game.GetVersion(version);
49 #ifdef PLATFORM_CONSOLE
50 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
52 version =
"#main_menu_version" +
" " + version;
57 string back =
"circle";
61 ImageWidget toolbar_b = ImageWidget.Cast(layoutRoot.FindAnyWidget(
"BackIcon"));
62 toolbar_b.LoadImageFile(0,
"set:playstation_buttons image:" + back);
69 InitPresets(-1, layoutRoot.FindAnyWidget(
"group_header"), input);
73 g_Game.SetKeyboardHandle(
this);
89 for (
int i = 0; i < sort_count; i++)
94 group_name =
Widget.TranslateString(
"#" + group_name);
101 m_Tabber.AddTab(
Widget.TranslateString(
"#layout_pc_keybinding_unsorted"));
108 m_GroupsContainer =
new KeybindingsContainer(-1,
g_Game.GetInput(),layoutRoot.FindAnyWidget(
"TabContentsHolder"),
this);
176 if (
GetUApi().GetInputByID(UAUITabLeft).LocalPress())
181 if (
GetUApi().GetInputByID(UAUITabRight).LocalPress())
186 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
199 #ifndef PLATFORM_MSSTORE
265 g_Game.GetUIManager().ShowDialog(
"#main_menu_configure",
"#main_menu_configure_desc",
MODAL_ID_BACK, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
269 g_Game.GetUIManager().Back();
286 g_Game.GetUIManager().ShowDialog(
"#menu_default_cap",
"#menu_default_desc",
MODAL_ID_DEFAULT, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
291 g_Game.GetUIManager().ShowDialog(
"#menu_default_cap",
"#menu_default_all_desc",
MODAL_ID_DEFAULT_ALL, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
319 if (result == DBB_YES)
322 g_Game.GetUIManager().Back();
328 if (result == DBB_YES)
336 if (result == DBB_YES)
343 if (result == DBB_YES)
357 g_Game.GetVersion(version);
358 #ifdef PLATFORM_CONSOLE
359 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
361 version =
"#main_menu_version" +
" " + version;
395 return super.OnMouseWheel(w,
x,
y, wheel);
439 ButtonWidget button = ButtonWidget.Cast(w);
440 if (button && button !=
m_Apply)
442 button.SetTextColor(
ARGB(255, 200, 0, 0));
448 #ifdef PLATFORM_WINDOWS
452 ButtonWidget button = ButtonWidget.Cast(w);
468 #ifdef PLATFORM_WINDOWS
472 ButtonWidget button = ButtonWidget.Cast(w);
486 Widget kb_root = parent.FindAnyWidget(
"keyboard_dropown");
498 opt1.Insert(profile_text);
503 m_PresetSelector =
new OptionSelectorMultistate(layoutRoot.FindAnyWidget(
"profile_setting_option"), current_idx, null,
false, opt1);
515 g_Game.GetUIManager().ShowDialog(
"#main_menu_configure",
"#main_menu_configure_desc",
MODAL_ID_PRESET_CHANGE, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
526 g_Game.GetInput().GetProfileName(index, profile_text);
528 g_Game.GetMission().GetOnInputPresetChanged().Invoke();
static int COLOR_NORMAL_TEXT
static int COLOR_DISABLED_TEXT
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
int ARGB(int a, int r, int g, int b)