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");
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
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);
109 #ifdef PLATFORM_CONSOLE
113 #ifdef PLATFORM_WINDOWS
114 g_Game.GetInput().EnableGamepad(
true);
120 PPERequesterBank.GetRequester(PPERequester_ServerBrowserBlur).Stop();
130 #ifdef PLATFORM_CONSOLE
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);
239 id.Split(
":", output);
240 if (output.Count() == 2)
242 string ip = output[0];
243 int port = output[1].ToInt();
264 g_Game.GetUIManager().ShowDialog(
"#layout_notification_info_warning",
"#STR_MaxFavouriteReached", 0, DBT_OK, DBB_YES, DMT_EXCLAMATION,
this);
276 string serverId = ipAddress +
":" + port;
279 if (favorite && !isFavorited)
283 else if (isFavorited)
289 #ifndef PLATFORM_CONSOLE
297 g_Game.GetUIManager().Back();
383 trText.SetText(text);
390 #ifdef PLATFORM_CONSOLE
398 aButtonLabel =
"#ps4_ingame_menu_select";
400 aButtonLabel =
"#layout_xbox_ingame_menu_select";
405 aButtonLabel =
"#dialog_change";
417 #ifdef PLATFORM_CONSOLE
424 aButtonLabel =
"#ps4_ingame_menu_select";
426 aButtonLabel =
"#layout_xbox_ingame_menu_select";
440 #ifdef PLATFORM_CONSOLE
448 trText =
"#server_browser_menu_unfavorite";
452 trText =
"#server_browser_menu_favorite";
484 #ifdef PLATFORM_CONSOLE
485 if (
g_Game.GetUserManager() &&
g_Game.GetUserManager().GetSelectedUser())
487 name =
g_Game.GetUserManager().GetSelectedUser().GetName();
488 if (
name.LengthUtf8() > 18)
502 g_Game.GetVersion(version);
503 #ifdef PLATFORM_CONSOLE
504 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
506 version =
"#main_menu_version" +
" " + version;
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);
620 #ifdef PLATFORM_WINDOWS
631 id.Split(
":", output);
632 if (output.Count() != 2)
673 if (!
g_Game.VerifyWorldOwnership(mapNM))
696 #ifdef PLATFORM_CONSOLE
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,
"");
732 PPERequesterBank.GetRequester(PPERequester_ServerBrowserBlur).Stop();
750 switch (
m_Tabber.GetSelectedIndex())
774 #ifdef PLATFORM_CONSOLE
784 #ifdef PLATFORM_CONSOLE
807 #ifdef PLATFORM_WINDOWS
808 #ifdef PLATFORM_CONSOLE
824 int color_pnl =
ARGB(255, 0, 0, 0);
825 int color_lbl =
ARGB(255, 255, 0, 0);
827 #ifdef PLATFORM_CONSOLE
828 color_pnl =
ARGB(255, 200, 0, 0);
829 color_lbl =
ARGB(255, 255, 255, 255);
841 int color_pnl =
ARGB(0, 0, 0, 0);
842 int color_lbl =
ARGB(255, 255, 255, 255);
867 Widget panel = w.FindWidget(w.GetName() +
"_panel");
871 panel.SetColor(color);
886 label.SetColor(color);
891 text.SetColor(color);
896 text2.SetColor(color);
923 PPERequesterBank.GetRequester(PPERequester_ServerBrowserBlur).Stop();
EBiosError
Possible Error codes for bios API. This is the list of errors that can be returned from bios API....
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
GetServersResult the output structure of the GetServers operation.
static ref ScriptInvoker m_ServersAsyncInvoker
static ref ScriptInvoker m_ServerModLoadAsyncInvoker
static void GetFavoriteServers(TStringArray favServers)
proto bool Remove(func fn, int flags=EScriptInvokerRemoveFlags.ALL)
remove specific call from list
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
override void PressThumbRight()
override void PressSholderRight()
override void RefreshList()
override void OnLoadServersAsyncConsole(GetServersResult result_list, EBiosError error, string response)
override void PressSholderLeft()
override void RightRelease()
override void OnLoadServerModsAsync(string server_id, array< string > mods)
override void OnLoadServersAsyncPC(GetServersResult result_list, EBiosError error, string response)
override void RightHold()
override void LeftRelease()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
array< string > TStringArray
int ARGB(int a, int r, int g, int b)