3 private bool m_IsFilterChanged;
4 private bool m_IsFilterFocused;
7 private Widget m_WidgetNavFilters;
8 private Widget m_WidgetNavServers;
28 m_Root =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/server_browser/xbox/server_browser_tab_console_pages.layout", parent);
56 m_WidgetNavFilters =
m_Root.FindAnyWidget(
"filters_root_nav_wrapper");
57 m_WidgetNavServers =
m_Root.FindAnyWidget(
"server_list_root_nav_wrapper");
63 m_ButtonPageLeftImg =
m_Root.FindAnyWidget(
"servers_navigation_page_prev_icon_ps4");
64 m_ButtonPageRightImg =
m_Root.FindAnyWidget(
"servers_navigation_page_next_icon_ps4");
65 m_Root.FindAnyWidget(
"servers_navigation_page_prev_icon_xbox").Show(
false);
66 m_Root.FindAnyWidget(
"servers_navigation_page_next_icon_xbox").Show(
false);
68 m_ButtonPageLeftImg =
m_Root.FindAnyWidget(
"servers_navigation_page_prev_icon_xbox");
69 m_ButtonPageRightImg =
m_Root.FindAnyWidget(
"servers_navigation_page_next_icon_xbox");
70 m_Root.FindAnyWidget(
"servers_navigation_page_prev_icon_ps4").Show(
false);
71 m_Root.FindAnyWidget(
"servers_navigation_page_next_icon_ps4").Show(
false);
74 ShowHideConsoleWidgets();
76 m_Filters =
new ServerBrowserFilterContainer(
m_Root.FindAnyWidget(
"filters_content"),
this);
78 m_PnlPagesPanel =
m_Root.FindAnyWidget(
"servers_navigation_spacer");
81 m_PnlPagesPanel.Show(
true);
104 m_Root.FindAnyWidget(
"filters_button_wrapper").Show(
GetGame().
GetInput().IsEnabledMouseAndKeyboard());
106 m_Root.FindAnyWidget(
"filters_root_nav_img_lb_xbox").Show(
is_xbox);
107 m_Root.FindAnyWidget(
"filters_root_nav_img_rb_xbox").Show(
is_xbox);
108 m_Root.FindAnyWidget(
"server_list_root_nav_img_lb_xbox").Show(
is_xbox);
109 m_Root.FindAnyWidget(
"server_list_root_nav_img_rb_xbox").Show(
is_xbox);
111 m_Root.FindAnyWidget(
"filters_root_nav_img_l1_ps4").Show(!
is_xbox);
112 m_Root.FindAnyWidget(
"filters_root_nav_img_r1_ps4").Show(!
is_xbox);
113 m_Root.FindAnyWidget(
"server_list_root_nav_img_l1_ps4").Show(!
is_xbox);
114 m_Root.FindAnyWidget(
"server_list_root_nav_img_r1_ps4").Show(!
is_xbox);
122 ShowHideConsoleWidgets();
124 m_WidgetNavFilters.Show(m_IsFilterFocused);
125 m_WidgetNavServers.Show(!m_IsFilterFocused);
132 m_WidgetNavFilters.Show(
false);
133 m_WidgetNavServers.Show(
false);
134 m_ButtonPageLeftImg.Show(
false);
135 m_ButtonPageRightImg.Show(
false);
169 msg =
"#server_browser_tab_unable_to_get_server";
179 ServerBrowserEntry entry;
198 entry = GetServerEntryByIndex(
index);
199 entry.SetIsOnline(
true);
225 ServerBrowserEntry entry;
229 if (
index < m_ServerListEntiers.Count())
230 entry = m_ServerListEntiers[
index];
234 m_ServerListEntiers.Insert(entry);
247 m_IsFilterChanged =
true;
257 for (
int i = 0;
i < m_ServerListEntiers.Count();
i++)
258 m_ServerListEntiers[
i].
Show(
false);
268 m_IsFilterChanged =
false;
280 super.ResetFilters();
282 m_IsFilterChanged =
false;
287 if (m_IsFilterChanged)
290 m_IsFilterChanged =
false;
304 m_TimeLastServerRefresh =
GetGame().GetTime();
306 if (m_IsFilterChanged)
335 if (!m_IsFilterFocused)
349 if (!m_IsFilterFocused)
351 if ((
GetGame().
GetTime() - m_TimeLastServerRefreshHoldButton) > 100)
353 m_TimeLastServerRefreshHoldButton =
GetGame().GetTime();
367 if (!m_IsFilterFocused)
381 if (!m_IsFilterFocused)
383 if ((
GetGame().
GetTime() - m_TimeLastServerRefreshHoldButton) > 100)
385 m_TimeLastServerRefreshHoldButton =
GetGame().GetTime();
399 if (m_IsFilterFocused)
407 if (m_IsFilterFocused)
430 SetEnableFilters(
true);
431 SetEnableServers(
false);
436 m_WidgetNavFilters.Show(
true);
437 m_WidgetNavServers.Show(
false);
441 m_IsFilterFocused =
true;
448 SetEnableServers(
true);
449 SetEnableFilters(
false);
453 m_WidgetNavFilters.Show(
false);
454 m_WidgetNavServers.Show(
true);
463 m_IsFilterFocused =
false;
505 m_ButtonPageLeftImg.Show(
false);
507 m_ButtonPageRightImg.Show(
false);
554 w.SetColor(
ARGB(255, 200, 0, 0));
570 button.SetTextColor(
ARGB(255, 255, 255, 255));
573 w.SetColor(
ARGB(0, 255, 255, 255));
583 text1.SetColor(
ARGB(255, 255, 255, 255));
586 text2.SetColor(
ARGB(255, 255, 255, 255));
590 text3.SetColor(
ARGB(255, 255, 255, 255));
595 image.SetColor(
ARGB(255, 255, 255, 255));
603#ifdef PLATFORM_WINDOWS
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
EBiosError
Possible Error codes for bios API. This is the list of errors that can be returned from bios API....
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...
ref ServerBrowserFilterContainer m_Filters
ref map< ESortType, ref array< ref GetServersResultRow > > m_EntriesSorted
Widget m_FilterSearchText
ServerBrowserEntry m_SelectedServer
ref GetServersInput m_CurrentFilterInput
ButtonWidget m_BtnPageNext
ref map< string, ref ServerBrowserEntry > m_EntryWidgets
void ScrollToEntry(ServerBrowserEntry entry)
ScrollWidget m_ServerListScroller
string m_CurrentSelectedServer
ServerBrowserMenuNew m_Menu
SelectedPanel m_SelectedPanel
ButtonWidget m_BtnPagePrev
SpacerBaseWidget m_ServerList
Widget m_FilterSearchTextBox
ref set< string > m_OnlineFavServers
void SetCurrentPage(int page_num)
static int COLOR_DISABLED_TEXT
The error handler itself, for managing and distributing errors to modules Manages the ErrorHandlerMod...
static proto string GetClientMessage(ErrorCategory category, int code, string additionalInfo="")
Gets the Client Message for specified error.
GetServersResult the output structure of the GetServers operation.
override bool PassFilter(GetServersResultRow result)
override void RefreshList()
override void LoadExtraEntries(int index)
override void OnLoadServersAsyncFinished()
override void SetFocusFilters()
override void LoadEntries(int cur_page_index, GetServersResultRowArray page_entries)
ref array< ref ServerBrowserEntry > m_ServerListEntiers
override void PressSholderRight()
override void ColorDisable(Widget w)
override void ApplyFilters()
override bool OnClick(Widget w, int x, int y, int button)
ServerBrowserEntry GetServerEntryByIndex(int index)
TextWidget m_PnlPagesLoadingText
int m_TimeLastServerRefresh
Widget m_ButtonPageRightImg
override void ColorNormal(Widget w)
override void ResetFilters()
int m_ServersEstimateCount
Widget m_ButtonPageLeftImg
int m_TimeLastServerRefreshHoldButton
override void RefreshList()
override void OnLoadServersAsyncConsole(GetServersResult result_list, EBiosError error, string response)
override void PressSholderLeft()
override void OnFilterChanged()
void LoadEntries(int cur_page_index, GetServersResultRowArray page_entries)
void SetEnableServers(bool enable)
override void RightRelease()
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
void SetEnableFilters(bool enable)
override void Construct(Widget parent, ServerBrowserMenuNew menu, TabType type)
void ShowHideConsoleWidgets()
override void ColorHighlight(Widget w)
void OnLoadServersAsyncFinished()
override void RightHold()
bool CanRefreshServerList()
override void LeftRelease()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
int ARGB(int a, int r, int g, int b)