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));
100 #ifdef PLATFORM_WINDOWS
109 #ifdef PLATFORM_CONSOLE
113 #ifdef PLATFORM_WINDOWS
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 layoutRoot.FindAnyWidget(
"PlayIcon0").Show(
false);
145 layoutRoot.FindAnyWidget(
"BackIcon0").Show(
false);
146 if (
GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer())
154 #ifdef PLATFORM_CONSOLE
155 if (
GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer())
157 layoutRoot.FindAnyWidget(
"toolbar_bg").Show(
false);
158 layoutRoot.FindAnyWidget(
"ConsoleControls").Show(
false);
159 layoutRoot.FindAnyWidget(
"PlayIcon0").Show(
true);
160 layoutRoot.FindAnyWidget(
"BackIcon0").Show(
true);
229 id.Split(
":", output);
230 if (output.Count() == 2)
232 string ip = output[0];
233 int port = output[1].ToInt();
254 g_Game.GetUIManager().ShowDialog(
"#layout_notification_info_warning",
"#STR_MaxFavouriteReached", 0, DBT_OK, DBB_YES, DMT_EXCLAMATION,
this);
266 string serverId = ipAddress +
":" + port;
269 if (favorite && !isFavorited)
273 else if (isFavorited)
279#ifndef PLATFORM_CONSOLE
373 trText.SetText(text);
380 #ifdef PLATFORM_CONSOLE
388 aButtonLabel =
"#ps4_ingame_menu_select";
390 aButtonLabel =
"#layout_xbox_ingame_menu_select";
395 aButtonLabel =
"#dialog_change";
407 #ifdef PLATFORM_CONSOLE
414 aButtonLabel =
"#ps4_ingame_menu_select";
416 aButtonLabel =
"#layout_xbox_ingame_menu_select";
430 #ifdef PLATFORM_CONSOLE
438 trText =
"#server_browser_menu_unfavorite";
442 trText =
"#server_browser_menu_favorite";
474 #ifdef PLATFORM_CONSOLE
475 if (
GetGame().GetUserManager() &&
GetGame().GetUserManager().GetSelectedUser())
478 if (
name.LengthUtf8() > 18)
493 #ifdef PLATFORM_CONSOLE
494 version =
"#main_menu_version" +
" " + version +
" (" +
g_Game.GetDatabaseID() +
")";
496 version =
"#main_menu_version" +
" " + version;
504 if (
GetUApi().GetInputByID(UAUIThumbRight).LocalPress())
509 if (
GetUApi().GetInputByID(UAUITabLeft).LocalPress())
514 if (
GetUApi().GetInputByID(UAUITabRight).LocalPress())
519 if (
GetUApi().GetInputByID(UAUINextDown).LocalPress())
524 if (
GetUApi().GetInputByID(UAUINextUp).LocalPress())
529 if (
GetUApi().GetInputByID(UAUISelect).LocalPress())
534 if (
GetUApi().GetInputByID(UAUICtrlX).LocalPress())
539 if (
GetUApi().GetInputByID(UAUICtrlY).LocalPress())
544 if (
GetUApi().GetInputByID(UAUILeft).LocalPress())
550 if (
GetUApi().GetInputByID(UAUILeft).LocalHold())
556 if (
GetUApi().GetInputByID(UAUILeft).LocalRelease())
561 if (
GetUApi().GetInputByID(UAUIRight).LocalPress())
567 if (
GetUApi().GetInputByID(UAUIRight).LocalHold())
573 if (
GetUApi().GetInputByID(UAUIRight).LocalRelease())
578 if (
GetUApi().GetInputByID(UAUIUp).LocalPress())
583 if (
GetUApi().GetInputByID(UAUIDown).LocalPress())
588 if (
GetUApi().GetInputByID(UAUIBack).LocalPress())
594 super.Update(timeslice);
610#ifdef PLATFORM_WINDOWS
621 id.Split(
":", output);
622 if (output.Count() != 2)
657 if (!
g_Game.VerifyWorldOwnership(mapNM))
680 #ifdef PLATFORM_CONSOLE
692 if (!
g_Game.VerifyWorldOwnership(mapNM))
703 g_Game.GoBuyWorldDLC(mapNM);
710 g_Game.ConnectFromServerBrowserEx(ip, port, steamQueryPort,
"");
716 PPERequesterBank.GetRequester(PPERequester_ServerBrowserBlur).Stop();
734 switch (
m_Tabber.GetSelectedIndex())
758 #ifdef PLATFORM_CONSOLE
772 #ifdef PLATFORM_CONSOLE
795 #ifdef PLATFORM_WINDOWS
796 #ifdef PLATFORM_CONSOLE
812 int color_pnl =
ARGB(255, 0, 0, 0);
813 int color_lbl =
ARGB(255, 255, 0, 0);
815 #ifdef PLATFORM_CONSOLE
816 color_pnl =
ARGB(255, 200, 0, 0);
817 color_lbl =
ARGB(255, 255, 255, 255);
829 int color_pnl =
ARGB(0, 0, 0, 0);
830 int color_lbl =
ARGB(255, 255, 255, 255);
855 Widget panel = w.FindWidget(w.GetName() +
"_panel");
859 panel.SetColor(color);
874 label.SetColor(color);
879 text.SetColor(color);
884 text2.SetColor(color);
911 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 Input GetInput()
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)