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);
241 id.Split(
":", output);
242 if (output.Count() == 2)
244 string ip = output[0];
245 int port = output[1].ToInt();
266 g_Game.GetUIManager().ShowDialog(
"#layout_notification_info_warning",
"#STR_MaxFavouriteReached", 0, DBT_OK, DBB_YES, DMT_EXCLAMATION,
this);
278 string serverId = ipAddress +
":" + port;
281 if (favorite && !isFavorited)
285 else if (isFavorited)
291 #ifndef PLATFORM_CONSOLE
299 g_Game.GetUIManager().Back();
385 trText.SetText(text);
392 #ifdef PLATFORM_CONSOLE
400 aButtonLabel =
"#ps4_ingame_menu_select";
402 aButtonLabel =
"#layout_xbox_ingame_menu_select";
407 aButtonLabel =
"#dialog_change";
419 #ifdef PLATFORM_CONSOLE
426 aButtonLabel =
"#ps4_ingame_menu_select";
428 aButtonLabel =
"#layout_xbox_ingame_menu_select";
442 #ifdef PLATFORM_CONSOLE
450 trText =
"#server_browser_menu_unfavorite";
454 trText =
"#server_browser_menu_favorite";
486 #ifdef PLATFORM_CONSOLE
487 if (
g_Game.GetUserManager() &&
g_Game.GetUserManager().GetSelectedUser())
489 name =
g_Game.GetUserManager().GetSelectedUser().GetName();
490 if (
name.LengthUtf8() > 18)
504 g_Game.GetVersion(version);
505 #ifdef PLATFORM_CONSOLE
506 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
508 version =
"#main_menu_version" +
" " + version;
516 if (
GetUApi().GetInputByID(UAUIThumbRight).LocalPress())
521 if (
GetUApi().GetInputByID(UAUITabLeft).LocalPress())
526 if (
GetUApi().GetInputByID(UAUITabRight).LocalPress())
531 if (
GetUApi().GetInputByID(UAUINextDown).LocalPress())
536 if (
GetUApi().GetInputByID(UAUINextUp).LocalPress())
541 if (
GetUApi().GetInputByID(UAUISelect).LocalPress())
546 if (
GetUApi().GetInputByID(UAUICtrlX).LocalPress())
551 if (
GetUApi().GetInputByID(UAUICtrlY).LocalPress())
556 if (
GetUApi().GetInputByID(UAUILeft).LocalPress())
562 if (
GetUApi().GetInputByID(UAUILeft).LocalHold())
568 if (
GetUApi().GetInputByID(UAUILeft).LocalRelease())
573 if (
GetUApi().GetInputByID(UAUIRight).LocalPress())
579 if (
GetUApi().GetInputByID(UAUIRight).LocalHold())
585 if (
GetUApi().GetInputByID(UAUIRight).LocalRelease())
590 if (
GetUApi().GetInputByID(UAUIUp).LocalPress())
595 if (
GetUApi().GetInputByID(UAUIDown).LocalPress())
600 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
606 super.Update(timeslice);
622 #ifdef PLATFORM_WINDOWS
633 id.Split(
":", output);
634 if (output.Count() != 2)
694 #ifdef PLATFORM_CONSOLE
701 void Play(
bool warnAboutMissingDLC =
true)
710 if (!contentDLC.
UseDLC(dlcId))
712 if (warnAboutMissingDLC)
724 g_Game.ConnectFromServerBrowserEx(ip, port, steamQueryPort,
"");
730 PPERequesterBank.GetRequester(PPERequester_ServerBrowserBlur).Stop();
748 switch (
m_Tabber.GetSelectedIndex())
772 #ifdef PLATFORM_CONSOLE
782 #ifdef PLATFORM_CONSOLE
805 #ifdef PLATFORM_WINDOWS
806 #ifdef PLATFORM_CONSOLE
822 int color_pnl =
ARGB(255, 0, 0, 0);
823 int color_lbl =
ARGB(255, 255, 0, 0);
825 #ifdef PLATFORM_CONSOLE
826 color_pnl =
ARGB(255, 200, 0, 0);
827 color_lbl =
ARGB(255, 255, 255, 255);
839 int color_pnl =
ARGB(0, 0, 0, 0);
840 int color_lbl =
ARGB(255, 255, 255, 255);
865 Widget panel = w.FindWidget(w.GetName() +
"_panel");
869 panel.SetColor(color);
884 label.SetColor(color);
889 text.SetColor(color);
894 text2.SetColor(color);
921 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
proto bool IsDLCInstalled(EDLCId dlcId)
proto EDLCId GetDLCFromWorld(string world)
proto bool UseDLC(EDLCId dlcId)
proto bool BuyDLC(EDLCId dlcId)
static proto native bool IsValidDLCID(EDLCId dlcId)
Check if a DLC ID is valid.
ContentDLC is for query installed DLC (only as entitlement keys, not content)
static void WarnAndOpenStore(EDLCId dlcId)
Informs the player that a DLC is missing and opens the platform store once the warning has been confi...
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.
class array< Class T > TStringArray
int ARGB(int a, int r, int g, int b)