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
278 if (!
g_Game.GetUIManager().IsDialogVisible() && !
g_Game.GetUIManager().IsModalVisible())
282 g_Game.GetUIManager().ShowDialog(
"#main_menu_configure",
"#main_menu_configure_desc", 1337, DBT_YESNO, DBB_YES, DMT_QUESTION,
this);
283 #ifdef PLATFORM_CONSOLE
291 g_Game.GetUIManager().Back();
709 super.Update(timeslice);
714 #ifdef PLATFORM_CONSOLE
720 if (
g_Game.GetUIManager().IsDialogVisible())
725 if (
GetUApi().GetInputByID(UAUITabLeft).LocalPress())
729 else if (
GetUApi().GetInputByID(UAUITabRight).LocalPress())
733 else if (
GetUApi().GetInputByID(UAUICtrlX).LocalPress())
740 else if (
GetUApi().GetInputByID(UAUICredits).LocalPress())
748 else if (
GetUApi().GetInputByID(UAUICtrlY).LocalPress())
752 else if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
766 if (w.IsInherited(ButtonWidget))
768 ButtonWidget button = ButtonWidget.Cast(w);
769 button.SetTextColor(
ARGB(255, 200, 0, 0));
772 w.SetColor(
ARGB(255, 0, 0, 0));
777 ImageWidget image = ImageWidget.Cast(w.FindAnyWidget(w.GetName() +
"_image"));
778 Widget option =
Widget.Cast(w.FindAnyWidget(w.GetName() +
"_option_wrapper"));
779 Widget option_label = w.FindAnyWidget(
"option_label");
783 text1.SetColor(
ARGB(255, 255, 0, 0));
788 text2.SetColor(
ARGB(255, 255, 0, 0));
793 text3.SetColor(
ARGB(255, 255, 0, 0));
799 image.SetColor(
ARGB(255, 200, 0, 0));
804 option.SetColor(
ARGB(255, 255, 0, 0));
809 option_label.SetColor(
ARGB(255, 255, 0, 0));
820 if (w.IsInherited(ButtonWidget))
822 ButtonWidget button = ButtonWidget.Cast(w);
823 button.SetTextColor(
ARGB(255, 255, 255, 255));
829 ImageWidget image = ImageWidget.Cast(w.FindAnyWidget(w.GetName() +
"_image"));
830 Widget option = w.FindAnyWidget(w.GetName() +
"_option_wrapper");
831 Widget option_label = w.FindAnyWidget(
"option_label");
835 text1.SetColor(
ARGB(255, 255, 255, 255));
840 text2.SetColor(
ARGB(255, 255, 255, 255));
845 text3.SetColor(
ARGB(255, 255, 255, 255));
851 image.SetColor(
ARGB(255, 255, 255, 255));
856 option.SetColor(
ARGB(150, 255, 255, 255));
861 option_label.SetColor(
ARGB(255, 255, 255, 255));
883 #ifdef PLATFORM_CONSOLE
886 if (
g_Game.GetUIManager().IsDialogVisible() ||
g_Game.GetUIManager().IsDialogQueued())
908 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.