31 #ifdef PLATFORM_CONSOLE
33 m_FavoritesTab =
new ServerBrowserFavoritesTabConsolePages(layoutRoot.FindAnyWidget(
"Tab_0"),
this,
TabType.FAVORITE);
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);
64 #ifdef PLATFORM_CONSOLE
65 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
66 if (
GetGame().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));
105 #ifdef PLATFORM_CONSOLE
112 PPERequesterBank.GetRequester(PPERequester_ServerBrowserBlur).Stop();
122 #ifdef PLATFORM_CONSOLE
129 switch (pInputDeviceType)
132 #ifdef PLATFORM_CONSOLE
134 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
true);
135 layoutRoot.FindAnyWidget(
"ConsoleControls").Show(
true);
136 layoutRoot.FindAnyWidget(
"PlayIcon0").Show(
false);
137 layoutRoot.FindAnyWidget(
"BackIcon0").Show(
false);
138 if (
GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer())
146 #ifdef PLATFORM_CONSOLE
147 if (
GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer())
149 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
false);
150 layoutRoot.FindAnyWidget(
"ConsoleControls").Show(
false);
151 layoutRoot.FindAnyWidget(
"PlayIcon0").Show(
true);
152 layoutRoot.FindAnyWidget(
"BackIcon0").Show(
true);
221 id.Split(
":", output);
222 if (output.Count() == 2)
224 string ip = output[0];
225 int port = output[1].ToInt();
246 g_Game.GetUIManager().ShowDialog(
"#layout_notification_info_warning",
"#STR_MaxFavouriteReached", 0, DBT_OK, DBB_YES, DMT_EXCLAMATION,
this);
258 string serverId = ipAddress +
":" + port;
261 if (favorite && !isFavorited)
265 else if (isFavorited)
271#ifndef PLATFORM_CONSOLE
365 trText.SetText(text);
372 #ifdef PLATFORM_CONSOLE
380 aButtonLabel =
"#ps4_ingame_menu_select";
382 aButtonLabel =
"#layout_xbox_ingame_menu_select";
387 aButtonLabel =
"#dialog_change";
399 #ifdef PLATFORM_CONSOLE
406 aButtonLabel =
"#ps4_ingame_menu_select";
408 aButtonLabel =
"#layout_xbox_ingame_menu_select";
422 #ifdef PLATFORM_CONSOLE
430 trText =
"#server_browser_menu_unfavorite";
434 trText =
"#server_browser_menu_favorite";
466 #ifdef PLATFORM_CONSOLE
467 if (
GetGame().GetUserManager() &&
GetGame().GetUserManager().GetSelectedUser())
470 if (
name.LengthUtf8() > 18)
485 #ifdef PLATFORM_CONSOLE
486 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
488 version =
"#main_menu_version" +
" " + version;
496 if (
GetUApi().GetInputByID(UAUIThumbRight).LocalPress())
501 if (
GetUApi().GetInputByID(UAUITabLeft).LocalPress())
506 if (
GetUApi().GetInputByID(UAUITabRight).LocalPress())
511 if (
GetUApi().GetInputByID(UAUINextDown).LocalPress())
516 if (
GetUApi().GetInputByID(UAUINextUp).LocalPress())
521 if (
GetUApi().GetInputByID(UAUISelect).LocalPress())
526 if (
GetUApi().GetInputByID(UAUICtrlX).LocalPress())
531 if (
GetUApi().GetInputByID(UAUICtrlY).LocalPress())
536 if (
GetUApi().GetInputByID(UAUILeft).LocalPress())
542 if (
GetUApi().GetInputByID(UAUILeft).LocalHold())
548 if (
GetUApi().GetInputByID(UAUILeft).LocalRelease())
553 if (
GetUApi().GetInputByID(UAUIRight).LocalPress())
559 if (
GetUApi().GetInputByID(UAUIRight).LocalHold())
565 if (
GetUApi().GetInputByID(UAUIRight).LocalRelease())
570 if (
GetUApi().GetInputByID(UAUIUp).LocalPress())
575 if (
GetUApi().GetInputByID(UAUIDown).LocalPress())
580 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
586 super.Update(timeslice);
602#ifdef PLATFORM_WINDOWS
613 id.Split(
":", output);
614 if (output.Count() != 2)
649 if (!
g_Game.VerifyWorldOwnership(mapNM))
672 #ifdef PLATFORM_CONSOLE
684 if (!
g_Game.VerifyWorldOwnership(mapNM))
695 g_Game.GoBuyWorldDLC(mapNM);
702 g_Game.ConnectFromServerBrowserEx(ip, port, steamQueryPort,
"");
708 PPERequesterBank.GetRequester(PPERequester_ServerBrowserBlur).Stop();
726 switch (
m_Tabber.GetSelectedIndex())
750 #ifdef PLATFORM_CONSOLE
764 #ifdef PLATFORM_CONSOLE
787 #ifdef PLATFORM_WINDOWS
788 #ifdef PLATFORM_CONSOLE
804 int color_pnl =
ARGB(255, 0, 0, 0);
805 int color_lbl =
ARGB(255, 255, 0, 0);
807 #ifdef PLATFORM_CONSOLE
808 color_pnl =
ARGB(255, 200, 0, 0);
809 color_lbl =
ARGB(255, 255, 255, 255);
821 int color_pnl =
ARGB(0, 0, 0, 0);
822 int color_lbl =
ARGB(255, 255, 255, 255);
847 Widget panel = w.FindWidget(w.GetName() +
"_panel");
851 panel.SetColor(color);
866 label.SetColor(color);
871 text.SetColor(color);
876 text2.SetColor(color);
903 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 native owned string GetName()
proto native BiosUser GetSelectedUser()
Returns the currently selected user.
proto native UIManager GetUIManager()
proto native void GetProfileStringList(string name, out TStringArray values)
Gets array of strings from profile variable.
proto native BiosUserManager GetUserManager()
proto native WorkspaceWidget GetWorkspace()
proto native void SaveProfile()
Saves profile on disk.
proto native void SetProfileStringList(string name, TStringArray values)
Sets array of strings to profile variable.
proto void GetVersion(out string version)
proto native Mission GetMission()
GetServersResult the output structure of the GetServers operation.
ScriptInvoker GetOnInputDeviceChanged()
ScriptInvoker GetOnInputPresetChanged()
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()
proto native void ShowDialog(string caption, string text, int id, int butts, int def, int type, UIScriptedMenu handler)
Shows message dialog.
void ShowUICursor(bool visible)
bool Back()
Close top window on windows stack, returns true when any window is closed.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
array< string > TStringArray
int ARGB(int a, int r, int g, int b)