31 #ifdef PLATFORM_CONSOLE
32 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/server_browser/xbox/server_browser.layout");
33 m_FavoritesTab =
new ServerBrowserFavoritesTabConsolePages(layoutRoot.FindAnyWidget(
"Tab_0"),
this,
TabType.FAVORITE);
37 layoutRoot =
g_Game.GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/server_browser/pc/server_browser.layout");
38 m_FavoritesTab =
new ServerBrowserFavoritesTabPc(layoutRoot.FindAnyWidget(
"Tab_0"),
this,
TabType.FAVORITE);
44 layoutRoot.FindAnyWidget(
"Tabber").GetScript(
m_Tabber);
46 m_Play = layoutRoot.FindAnyWidget(
"play");
49 m_Back = layoutRoot.FindAnyWidget(
"back_button");
51 m_PlayerName = TextWidget.Cast(layoutRoot.FindAnyWidget(
"character_name_text"));
54 #ifndef PLATFORM_CONSOLE
55 layoutRoot.FindAnyWidget(
"customize_character").Show(
false);
56 layoutRoot.FindAnyWidget(
"character").Show(
false);
62 g_Game.GetVersion(version);
64 #ifdef PLATFORM_CONSOLE
65 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
66 if (
g_Game.GetInput().IsEnabledMouseAndKeyboard())
68 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
false);
77 version =
"#main_menu_version" +
" " + version;
88 #ifdef PLATFORM_CONSOLE
91 TextWidget sort_text = TextWidget.Cast(layoutRoot.FindAnyWidget(
"SortText"));
92 sort_text.SetText(
"#str_serverbrowserroot_toolbar_bg_consoletoolbar_sort_sorttext0");
95 PPERequesterBank.GetRequester(PPERequester_ServerBrowserBlur).Start(
new Param1<float>(0.5));
100 #ifdef PLATFORM_WINDOWS
101 g_Game.GetInput().EnableGamepad(
false);
137 switch (pInputDeviceType)
140 #ifdef PLATFORM_CONSOLE
142 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
true);
143 layoutRoot.FindAnyWidget(
"ConsoleControls").Show(
true);
144 #ifdef PLATFORM_MSSTORE
145 layoutRoot.FindAnyWidget(
"PlayIcon0").Show(
true);
146 layoutRoot.FindAnyWidget(
"BackIcon0").Show(
true);
148 layoutRoot.FindAnyWidget(
"PlayIcon0").Show(
false);
149 layoutRoot.FindAnyWidget(
"BackIcon0").Show(
false);
151 if (
g_Game.GetInput().IsEnabledMouseAndKeyboardEvenOnServer())
153 g_Game.GetUIManager().ShowUICursor(
false);
159 #ifdef PLATFORM_CONSOLE
160 if (
g_Game.GetInput().IsEnabledMouseAndKeyboardEvenOnServer())
162 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
false);
163 layoutRoot.FindAnyWidget(
"ConsoleControls").Show(
false);
164 #ifdef PLATFORM_MSSTORE
165 layoutRoot.FindAnyWidget(
"PlayIcon0").Show(
false);
166 layoutRoot.FindAnyWidget(
"BackIcon0").Show(
false);
168 layoutRoot.FindAnyWidget(
"PlayIcon0").Show(
true);
169 layoutRoot.FindAnyWidget(
"BackIcon0").Show(
true);
171 g_Game.GetUIManager().ShowUICursor(
true);
514 if (
GetUApi().GetInputByID(UAUIThumbRight).LocalPress())
519 if (
GetUApi().GetInputByID(UAUITabLeft).LocalPress())
524 if (
GetUApi().GetInputByID(UAUITabRight).LocalPress())
529 if (
GetUApi().GetInputByID(UAUINextDown).LocalPress())
534 if (
GetUApi().GetInputByID(UAUINextUp).LocalPress())
539 if (
GetUApi().GetInputByID(UAUISelect).LocalPress())
544 if (
GetUApi().GetInputByID(UAUICtrlX).LocalPress())
549 if (
GetUApi().GetInputByID(UAUICtrlY).LocalPress())
554 if (
GetUApi().GetInputByID(UAUILeft).LocalPress())
560 if (
GetUApi().GetInputByID(UAUILeft).LocalHold())
566 if (
GetUApi().GetInputByID(UAUILeft).LocalRelease())
571 if (
GetUApi().GetInputByID(UAUIRight).LocalPress())
577 if (
GetUApi().GetInputByID(UAUIRight).LocalHold())
583 if (
GetUApi().GetInputByID(UAUIRight).LocalRelease())
588 if (
GetUApi().GetInputByID(UAUIUp).LocalPress())
593 if (
GetUApi().GetInputByID(UAUIDown).LocalPress())
598 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
604 super.Update(timeslice);
708 if (!
g_Game.VerifyWorldOwnership(mapNM))
718 g_Game.GetUIManager().ShowDialog(
"#server_browser_connect_label",
"#mod_detail_info_warning", 232, DBT_OK, DBB_NONE, DMT_INFO,
g_Game.GetUIManager().GetMenu());
719 g_Game.GoBuyWorldDLC(mapNM);
726 g_Game.ConnectFromServerBrowserEx(ip, port, steamQueryPort,
"");