41 #ifdef PLATFORM_MSSTORE
42 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/options/msstore/options_menu.layout", null);
45 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/options/xbox/options_menu.layout", null);
48 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/options/ps/options_menu.layout", null);
50 #ifdef PLATFORM_WINDOWS
51 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/options/pc/options_menu.layout", null);
57 layoutRoot.FindAnyWidget(
"Tabber").GetScript(
m_Tabber);
59 m_Details = layoutRoot.FindAnyWidget(
"settings_details");
65 #ifdef PLATFORM_MSSTORE
68 m_GamepadControls = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"gamepad_controls"));
69 m_KeyboardBindings = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"keyboard_bindings"));
79 m_Apply = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"apply"));
80 m_Back = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"back"));
81 m_Reset = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"reset"));
82 m_Defaults = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"defaults"));
89 g_Game.GetVersion(version);
90 #ifdef PLATFORM_CONSOLE
91 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
93 version =
"#main_menu_version" +
" " + version;
97 #ifdef PLATFORM_WINDOWS
282 if (!
g_Game.GetUIManager().IsDialogVisible() && !
g_Game.GetUIManager().IsModalVisible())
286 g_Game.GetUIManager().ShowDialog(
"#main_menu_configure",
"#main_menu_configure_desc", 1337, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
287 #ifdef PLATFORM_CONSOLE
295 g_Game.GetUIManager().Back();
702 super.Update(timeslice);
707 #ifdef PLATFORM_CONSOLE
713 if (
g_Game.GetUIManager().IsDialogVisible())
718 if (
GetUApi().GetInputByID(UAUITabLeft).LocalPress())
722 else if (
GetUApi().GetInputByID(UAUITabRight).LocalPress())
726 else if (
GetUApi().GetInputByID(UAUICtrlX).LocalPress())
733 else if (
GetUApi().GetInputByID(UAUICredits).LocalPress())
741 else if (
GetUApi().GetInputByID(UAUICtrlY).LocalPress())
745 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
759 if (w.IsInherited(ButtonWidget))
761 ButtonWidget button = ButtonWidget.Cast(w);
762 button.SetTextColor(
ARGB(255, 200, 0, 0));
765 w.SetColor(
ARGB(255, 0, 0, 0));
770 ImageWidget image = ImageWidget.Cast(w.FindAnyWidget(w.GetName() +
"_image"));
771 Widget option =
Widget.Cast(w.FindAnyWidget(w.GetName() +
"_option_wrapper"));
772 Widget option_label = w.FindAnyWidget(
"option_label");
776 text1.SetColor(
ARGB(255, 255, 0, 0));
781 text2.SetColor(
ARGB(255, 255, 0, 0));
786 text3.SetColor(
ARGB(255, 255, 0, 0));
792 image.SetColor(
ARGB(255, 200, 0, 0));
797 option.SetColor(
ARGB(255, 255, 0, 0));
802 option_label.SetColor(
ARGB(255, 255, 0, 0));
813 if (w.IsInherited(ButtonWidget))
815 ButtonWidget button = ButtonWidget.Cast(w);
816 button.SetTextColor(
ARGB(255, 255, 255, 255));
822 ImageWidget image = ImageWidget.Cast(w.FindAnyWidget(w.GetName() +
"_image"));
823 Widget option = w.FindAnyWidget(w.GetName() +
"_option_wrapper");
824 Widget option_label = w.FindAnyWidget(
"option_label");
828 text1.SetColor(
ARGB(255, 255, 255, 255));
833 text2.SetColor(
ARGB(255, 255, 255, 255));
838 text3.SetColor(
ARGB(255, 255, 255, 255));
844 image.SetColor(
ARGB(255, 255, 255, 255));
849 option.SetColor(
ARGB(150, 255, 255, 255));
854 option_label.SetColor(
ARGB(255, 255, 255, 255));
876 #ifdef PLATFORM_CONSOLE
879 if (
g_Game.GetUIManager().IsDialogVisible() ||
g_Game.GetUIManager().IsDialogQueued())
901 toolbar_text.SetText(text);
static proto string Format(string fmt, 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)
Gets n-th character from string.