DayZ 1.24
Loading...
Searching...
No Matches
ServerBrowserTab.c File Reference

Go to the source code of this file.

Enumerations

enum  TabType {
  OFFICIAL , COMMUNITY , LAN , FAVORITE ,
  NONE
}
 

Functions

void ServerBrowserTab (Widget parent, ServerBrowserMenuNew menu, TabType type)
 
void Construct (Widget parent, ServerBrowserMenuNew menu, TabType type)
 
void ~ServerBrowserTab ()
 
ServerBrowserMenuNew GetRootMenu ()
 
bool GetIsServerLoadingFinished ()
 
override bool OnClick (Widget w, int x, int y, int button)
 
void OnDLCChange (EDLCId dlcId)
 
void ScrollToEntry (ServerBrowserEntry entry)
 
void Focus ()
 
void OnFilterFocusLost (Widget w)
 
void OnFilterFocus (Widget w)
 
void OnFilterChanged ()
 
void ServerListFocus (bool focus, bool favorite)
 
override bool OnFocus (Widget w, int x, int y)
 
override bool OnFocusLost (Widget w, int x, int y)
 
override bool OnMouseEnter (Widget w, int x, int y)
 
override bool OnMouseLeave (Widget w, Widget enterW, int x, int y)
 
bool IsFocusable (Widget w)
 
void SetPanelFocus ()
 
void PressA ()
 
void PressX ()
 
void PressY ()
 
void PressSholderLeft ()
 
void PressSholderRight ()
 
void Left ()
 
void LeftHold ()
 
void LeftRelease ()
 
void Right ()
 
void RightHold ()
 
void RightRelease ()
 
void Up ()
 
void Down ()
 
void OnLoadServerModsAsync (string server_id, array< string > mods)
 
void GetNextEntry ()
 
void GetPrevEntry ()
 
void GetNextFilter ()
 
void GetPrevFilter ()
 
void SetCurrentPage (int page_num)
 
int GetCurrentPage ()
 
bool IsNotInitialized ()
 
void ResetFilters ()
 
void ApplyFilters ()
 
void AddFavoritesToFilter (ref GetServersInput input)
 
void RefreshList ()
 
void GetNextPage ()
 
void SelectServer (ServerBrowserEntry server)
 
void OnLoadServersAsyncPC (ref GetServersResult result_list, EBiosError error, string response)
 
void OnLoadServersAsyncConsole (GetServersResult result_list, EBiosError error, string response)
 
void SetSort (ESortType type, ESortOrder order)
 
bool IsPingInRange (int ping, string max_ping)
 
bool PassFilter (GetServersResultRow result)
 
void LoadExtraEntries (int index)
 
void Connect (ServerBrowserEntry server)
 
string GetSortOption ()
 
int AddSorted (GetServersResultRow entry)
 
void Unfavorite (string uid)
 
TabType GetTabType ()
 
void ButtonEnable (Widget w)
 
void ButtonDisable (Widget w)
 
void ColorHighlight (Widget w)
 
void ColorNormal (Widget w)
 
void ColorDisable (Widget w)
 

Variables

enum TabType BROWSER
 
enum TabType FILTERS
 
enum TabType m_Root
 
ScrollWidget m_ServerListScroller
 
SpacerBaseWidget m_ServerList
 
ref map< string, ref ServerBrowserEntry > m_EntryWidgets
 
ref map< string, ref array< string > > m_EntryMods
 
ref ServerBrowserFilterContainer m_Filters
 
ServerBrowserMenuNew m_Menu
 
ServerBrowserEntry m_SelectedServer
 
TabType m_TabType
 
ESortType m_SortType
 
ESortOrder m_SortOrder
 
SelectedPanel m_SelectedPanel
 
bool m_Initialized
 
bool m_BegunLoading
 
bool m_Loading
 
int m_TotalServers
 
int m_TotalLoadedServers
 
int m_LastLoadedPage
 
int m_TotalPages
 
bool m_LoadingFinished
 
int m_CurrentPageNum
 
string m_CurrentSelectedServer
 
int m_CurrentLoadedPage
 
ref GetServersInput m_CurrentFilterInput
 
Widget m_ApplyFilter
 
Widget m_RefreshList
 
Widget m_ResetFilters
 
Widget m_FiltersChanged
 
Widget m_HostSort
 
Widget m_TimeSort
 
Widget m_PopulationSort
 
Widget m_SlotsSort
 
Widget m_PingSort
 
Widget m_FilterSearchText
 
Widget m_FilterSearchTextBox
 
TextWidget m_LoadingText
 
ButtonWidget m_BtnPagePrev
 
ButtonWidget m_BtnPageNext
 
ref map< ESortType, ref array< ref GetServersResultRow > > m_EntriesSorted
 
ref map< ESortType, ESortOrderm_SortInverted
 
ref set< stringm_OnlineFavServers
 

Enumeration Type Documentation

◆ TabType

Enumerator
OFFICIAL 
COMMUNITY 
LAN 
FAVORITE 
NONE 

Definition at line 1 of file ServerBrowserTab.c.

2{
5 LAN,
7 NONE
8}
@ COMMUNITY
@ NONE
@ LAN
@ OFFICIAL
@ FAVORITE

Function Documentation

◆ AddFavoritesToFilter()

void AddFavoritesToFilter ( ref GetServersInput input)
protected

Definition at line 380 of file ServerBrowserTab.c.

381 {
382 m_Menu.AddFavoritesToFilter(input);
383 }
ServerBrowserMenuNew m_Menu

References m_Menu.

Referenced by ServerBrowserTabConsolePages::RefreshList(), and ServerBrowserTabPc::RefreshList().

◆ AddSorted()

int AddSorted ( GetServersResultRow entry)
protected

Definition at line 557 of file ServerBrowserTab.c.

558 {
559 return -1;
560 }

Referenced by ServerBrowserTab::OnLoadServersAsyncPC().

◆ ApplyFilters()

void ApplyFilters ( )
protected

Definition at line 375 of file ServerBrowserTab.c.

376 {
377
378 }

Referenced by ServerBrowserTab::OnClick().

◆ ButtonDisable()

void ButtonDisable ( Widget w)
protected

Definition at line 580 of file ServerBrowserTab.c.

581 {
582 w.SetFlags(WidgetFlags.IGNOREPOINTER);
584 }
void ColorDisable(Widget w)
WidgetFlags
Definition EnWidgets.c:58

References ServerBrowserTab::ColorDisable().

Referenced by ServerBrowserTab::ApplyFilters(), ServerBrowserTab::Construct(), ServerBrowserTab::OnFilterChanged(), and ServerBrowserTab::ResetFilters().

◆ ButtonEnable()

void ButtonEnable ( Widget w)
protected

Definition at line 574 of file ServerBrowserTab.c.

575 {
576 w.ClearFlags(WidgetFlags.IGNOREPOINTER);
577 ColorNormal(w);
578 }
void ColorNormal(Widget w)

References ServerBrowserTab::ColorNormal().

Referenced by ServerBrowserTab::ApplyFilters(), ServerBrowserTab::OnFilterChanged(), and ServerBrowserTab::ResetFilters().

◆ ColorDisable()

void ColorDisable ( Widget w)
protected

Definition at line 666 of file ServerBrowserTab.c.

667 {
668#ifdef PLATFORM_WINDOWS
669 SetFocus(null);
670#endif
671
672 if (w)
673 {
675 if (button)
677 }
678 }
static int COLOR_DISABLED_TEXT
proto native void SetFocus(Widget w)

References ColorManager::COLOR_DISABLED_TEXT, and SetFocus().

◆ ColorHighlight()

void ColorHighlight ( Widget w)
protected

Definition at line 587 of file ServerBrowserTab.c.

588 {
589 if (w.IsInherited(ButtonWidget))
590 {
592 button.SetTextColor(ARGB(255, 200, 0, 0));
593 }
594
595 w.SetColor(ARGB(255, 0, 0, 0));
596
597 TextWidget text1 = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_text"));
598 TextWidget text2 = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_label"));
599 TextWidget text3 = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_text_1"));
600 ImageWidget image = ImageWidget.Cast(w.FindAnyWidget(w.GetName() + "_image"));
601 Widget option = Widget.Cast(w.FindAnyWidget(w.GetName() + "_option_wrapper"));
602 Widget option_label = w.FindAnyWidget("option_label");
603
604 if (text1)
605 text1.SetColor(ARGB(255, 255, 0, 0));
606
607 if (text2)
608 text2.SetColor(ARGB(255, 255, 0, 0));
609
610 if (text3)
611 {
612 text3.SetColor(ARGB(255, 255, 0, 0));
613 w.SetAlpha(1);
614 }
615
616 if (image)
617 image.SetColor(ARGB(255, 200, 0, 0));
618
619 if (option)
620 option.SetColor(ARGB(255, 255, 0, 0));
621
622 if (option_label)
623 option_label.SetColor(ARGB(255, 255, 0, 0));
624 }
int ARGB(int a, int r, int g, int b)
Definition proto.c:322

References ARGB().

Referenced by UIScriptedMenu::OnFocus(), UIScriptedMenu::OnMouseEnter(), OptionSelectorBase::OnMouseEnter(), and ServerBrowserTab::OnMouseEnter().

◆ ColorNormal()

void ColorNormal ( Widget w)
protected

Definition at line 626 of file ServerBrowserTab.c.

627 {
628 if ((w.GetFlags() & WidgetFlags.IGNOREPOINTER) == WidgetFlags.IGNOREPOINTER)
629 return;
630
631 if (w.IsInherited(ButtonWidget))
632 {
634 button.SetTextColor(ARGB(255, 255, 255, 255));
635 }
636
637 TextWidget text1 = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_text"));
638 TextWidget text2 = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_text_1"));
639 TextWidget text3 = TextWidget.Cast(w.FindAnyWidget(w.GetName() + "_label"));
640 ImageWidget image = ImageWidget.Cast(w.FindAnyWidget(w.GetName() + "_image"));
641 Widget option = w.FindAnyWidget(w.GetName() + "_option_wrapper");
642 Widget option_label = w.FindAnyWidget("option_label");
643
644 if (text1)
645 text1.SetColor(ARGB(255, 255, 255, 255));
646
647 if (text2)
648 text2.SetColor(ARGB(255, 255, 255, 255));
649
650 if (text3)
651 {
652 text3.SetColor(ARGB(255, 255, 255, 255));
653 w.SetAlpha(0);
654 }
655
656 if (image)
657 image.SetColor(ARGB(255, 255, 255, 255));
658
659 if (option)
660 option.SetColor(ARGB(150, 255, 255, 255));
661
662 if (option_label)
663 option_label.SetColor(ARGB(255, 255, 255, 255));
664 }

References ARGB().

Referenced by UIScriptedMenu::OnFocusLost(), UIScriptedMenu::OnModalResult(), UIScriptedMenu::OnMouseLeave(), OptionSelectorBase::OnMouseLeave(), and ServerBrowserTab::OnMouseLeave().

◆ Connect()

void Connect ( ServerBrowserEntry server)
protected

Definition at line 517 of file ServerBrowserTab.c.

518 {
519 if (!m_Menu)
520 return;
521
522 if (m_Menu.GetServersLoadingTab() != TabType.NONE)
523 return;
524
526 m_Menu.Connect(server);
527 }
ServerBrowserEntry m_SelectedServer
TabType

References m_Menu, and m_SelectedServer.

◆ Construct()

void Construct ( Widget parent,
ServerBrowserMenuNew menu,
TabType type )
protected

Definition at line 78 of file ServerBrowserTab.c.

79 {
83 m_LoadingText = TextWidget.Cast(m_Root.FindAnyWidget("loading_servers_info"));
84 }
ref map< ESortType, ref array< ref GetServersResultRow > > m_EntriesSorted
ref map< ESortType, ESortOrder > m_SortInverted
enum TabType m_Root
ref map< string, ref array< string > > m_EntryMods
TextWidget m_LoadingText

References m_EntriesSorted, m_EntryMods, m_LoadingText, m_Root, and m_SortInverted.

◆ Down()

void Down ( )
protected

◆ Focus()

void Focus ( )
protected

Definition at line 171 of file ServerBrowserTab.c.

172 {
174 {
177 }
178 }
ref map< string, ref ServerBrowserEntry > m_EntryWidgets
void ScrollToEntry(ServerBrowserEntry entry)
string m_CurrentSelectedServer

References m_CurrentSelectedServer, m_EntryWidgets, and ScrollToEntry().

◆ GetCurrentPage()

◆ GetIsServerLoadingFinished()

bool GetIsServerLoadingFinished ( )
protected

Definition at line 103 of file ServerBrowserTab.c.

104 {
105 return m_LoadingFinished;
106 }
bool m_LoadingFinished

References m_LoadingFinished.

◆ GetNextEntry()

void GetNextEntry ( )
protected

Definition at line 308 of file ServerBrowserTab.c.

309 {
311 if (!focused)
312 return;
313 Widget sibling = focused.GetSibling();
314 if (!sibling)
315 return;
316
317 if (focused.GetName() == "server_browser_list_entry_root")
318 {
319 if (sibling)
320 SetFocus(focused.GetSibling());
321 else
322 SetFocus(focused.GetParent().GetSibling().GetChildren());
323 }
324 }
proto native Widget GetFocus()

References GetFocus(), and SetFocus().

◆ GetNextFilter()

void GetNextFilter ( )
protected

Definition at line 345 of file ServerBrowserTab.c.

346 {
347
348 }

◆ GetNextPage()

void GetNextPage ( )
protected

Definition at line 438 of file ServerBrowserTab.c.

439 {
441 {
444 }
445 }
ref GetServersInput m_CurrentFilterInput
int m_TotalPages
int m_LastLoadedPage
static void LoadServers(notnull GetServersInput inputValues)

References OnlineServices::LoadServers(), m_CurrentFilterInput, m_LastLoadedPage, and m_TotalPages.

Referenced by ServerBrowserTab::OnLoadServersAsyncConsole().

◆ GetPrevEntry()

void GetPrevEntry ( )
protected

Definition at line 326 of file ServerBrowserTab.c.

327 {
329 if (focused && focused.GetName() == "server_browser_list_entry_root")
330 {
331 Widget sibling = focused.GetParent().GetChildren();
332 if (focused == sibling)
333 return;
334
335 while (sibling)
336 {
337 if (sibling && sibling.GetSibling() == focused)
339 else
340 sibling = sibling.GetSibling();
341 }
342 }
343 }

References GetFocus(), and SetFocus().

◆ GetPrevFilter()

void GetPrevFilter ( )
protected

Definition at line 350 of file ServerBrowserTab.c.

351 {
352
353 }

◆ GetRootMenu()

ServerBrowserMenuNew GetRootMenu ( )
protected

Definition at line 98 of file ServerBrowserTab.c.

99 {
100 return m_Menu;
101 }

References m_Menu.

Referenced by ServerBrowserTab::UpdateServerList().

◆ GetSortOption()

string GetSortOption ( )
protected

Definition at line 529 of file ServerBrowserTab.c.

530 {
531 switch (m_SortType)
532 {
533 case ESortType.HOST:
534 {
535 return "name";
536 }
537 case ESortType.TIME:
538 {
539 return "name";
540 }
541 case ESortType.POPULATION:
542 {
543 return "currentNumberPlayers";
544 }
545 case ESortType.SLOTS:
546 {
547 return "freeSlots";
548 }
549 case ESortType.PING:
550 {
551 return "name";
552 }
553 }
554 return "";
555 }
ESortType
ESortType m_SortType

References m_SortType.

Referenced by RefreshList().

◆ GetTabType()

TabType GetTabType ( )
protected

Definition at line 569 of file ServerBrowserTab.c.

570 {
571 return m_TabType;
572 }
TabType m_TabType

References m_TabType.

◆ IsFocusable()

◆ IsNotInitialized()

bool IsNotInitialized ( )
protected

Definition at line 365 of file ServerBrowserTab.c.

366 {
368 }
bool m_Initialized

References m_Initialized, and m_LoadingFinished.

Referenced by UIScriptedMenu::OnTabSwitch().

◆ IsPingInRange()

bool IsPingInRange ( int ping,
string max_ping )
protected

Definition at line 477 of file ServerBrowserTab.c.

478 {
479 int max = max_ping.Substring(1, max_ping.Length() - 1).ToInt();
480
481 if (ping < max)
482 return true;
483 return false;
484 }

Referenced by PassFilter().

◆ Left()

void Left ( )
protected

◆ LeftHold()

void LeftHold ( )
protected

◆ LeftRelease()

void LeftRelease ( )
protected

◆ LoadExtraEntries()

void LoadExtraEntries ( int index)
protected

Definition at line 512 of file ServerBrowserTab.c.

513 {
514
515 }

◆ OnClick()

override bool OnClick ( Widget w,
int x,
int y,
int button )
protected

Definition at line 108 of file ServerBrowserTab.c.

109 {
110
111 }

◆ OnDLCChange()

void OnDLCChange ( EDLCId dlcId)
protected

Definition at line 113 of file ServerBrowserTab.c.

114 {
115 switch (dlcId)
116 {
117 case EDLCId.DLC_BLISS:
118 {
120 foreach (ServerBrowserEntry entry : serverEntries)
121 entry.RefreshDLCIcon();
122 break;
123 }
124
125 default:
126 break;
127 }
128 }
EDLCId
Definition ContentDLC.c:4

References m_EntryWidgets.

Referenced by UIScriptedMenu::Init(), ScriptedWidgetEventHandler::MainMenuDlcHandlerBase(), ServerBrowserTab(), UIScriptedMenu::~MainMenuConsole(), ScriptedWidgetEventHandler::~MainMenuDlcHandlerBase(), and ~ServerBrowserTab().

◆ OnFilterChanged()

void OnFilterChanged ( )
protected

Definition at line 192 of file ServerBrowserTab.c.

193 {
194
195 }

Referenced by ScriptedWidgetEventHandler::ServerBrowserFilterContainer().

◆ OnFilterFocus()

void OnFilterFocus ( Widget w)
protected

Definition at line 186 of file ServerBrowserTab.c.

187 {
189 m_Menu.FilterFocus(true);
190 }
SelectedPanel m_SelectedPanel

References m_Menu, and m_SelectedPanel.

◆ OnFilterFocusLost()

void OnFilterFocusLost ( Widget w)
protected

Definition at line 180 of file ServerBrowserTab.c.

181 {
183 m_Menu.FilterFocus(false);
184 }

References m_Menu, and m_SelectedPanel.

◆ OnFocus()

override bool OnFocus ( Widget w,
int x,
int y )
protected

Definition at line 207 of file ServerBrowserTab.c.

208 {
209 if (IsFocusable(w))
210 {
212 {
214 return false;
215 }
216 else
218 return true;
219 }
220 return false;
221 }
bool IsFocusable(Widget w)
void ColorHighlight(Widget w)

References ServerBrowserTab::ColorHighlight(), ServerBrowserTab::IsFocusable(), m_FilterSearchText, and m_FilterSearchTextBox.

Referenced by OptionSelectorBase::OnMouseEnter().

◆ OnFocusLost()

override bool OnFocusLost ( Widget w,
int x,
int y )
protected

Definition at line 223 of file ServerBrowserTab.c.

224 {
225 if (IsFocusable(w))
226 {
228 {
230 return true;
231 }
232 else
233 ColorNormal(w);
234 return true;
235 }
236 return false;
237 }

References ServerBrowserTab::ColorNormal(), ServerBrowserTab::IsFocusable(), m_FilterSearchText, and m_FilterSearchTextBox.

Referenced by OptionSelectorBase::OnMouseLeave().

◆ OnLoadServerModsAsync()

void OnLoadServerModsAsync ( string server_id,
array< string > mods )
protected

Definition at line 303 of file ServerBrowserTab.c.

304 {
306 }

References m_EntryMods.

Referenced by UIScriptedMenu::Init(), and UIScriptedMenu::~ServerBrowserMenuNew().

◆ OnLoadServersAsyncConsole()

void OnLoadServersAsyncConsole ( GetServersResult result_list,
EBiosError error,
string response )
protected

Definition at line 466 of file ServerBrowserTab.c.

467 {
468
469 }

◆ OnLoadServersAsyncPC()

void OnLoadServersAsyncPC ( ref GetServersResult result_list,
EBiosError error,
string response )
protected

Definition at line 461 of file ServerBrowserTab.c.

462 {
463
464 }

◆ OnMouseEnter()

override bool OnMouseEnter ( Widget w,
int x,
int y )
protected

Definition at line 239 of file ServerBrowserTab.c.

240 {
241 if (IsFocusable(w))
242 {
244 if (w == m_FilterSearchText)
245 {
247 return true;
248 }
249 return true;
250 }
251 return false;
252 }

References ServerBrowserTab::ColorHighlight(), ServerBrowserTab::IsFocusable(), m_FilterSearchText, m_FilterSearchTextBox, and SetFocus().

◆ OnMouseLeave()

override bool OnMouseLeave ( Widget w,
Widget enterW,
int x,
int y )
protected

Definition at line 254 of file ServerBrowserTab.c.

255 {
256 if (IsFocusable(w))
257 {
259 {
260 }
261 else
262 ColorNormal(w);
263 return true;
264 }
265 return false;
266 }

References ServerBrowserTab::ColorNormal(), ServerBrowserTab::IsFocusable(), m_FilterSearchText, and m_FilterSearchTextBox.

◆ PassFilter()

bool PassFilter ( GetServersResultRow result)
protected

Definition at line 486 of file ServerBrowserTab.c.

487 {
488 if (!m_Menu || m_Menu.GetServersLoadingTab() != m_TabType)
489 return false;
490
491 if (m_Filters.m_PingFilter.IsSet())
492 {
493 if (!IsPingInRange(result.m_Ping, m_Filters.m_PingFilter.GetStringValue()))
494 return false;
495 }
496
497 if (m_Filters.m_PreviouslyPlayedFilter.IsSet())
498 {
499 bool is_visited = g_Game.IsVisited(result.m_HostIp, result.m_HostPort);
500
501 if (!is_visited && m_Filters.m_PreviouslyPlayedFilter.IsEnabled())
502 return false;
503
504 if (is_visited && m_Filters.m_PreviouslyPlayedFilter.IsEnabled())
505 return false;
506 }
507
508 return true;
509 }
DayZGame g_Game
Definition DayZGame.c:3528
ref ServerBrowserFilterContainer m_Filters
bool IsPingInRange(int ping, string max_ping)

References g_Game, IsPingInRange(), m_Filters, m_Menu, and m_TabType.

Referenced by ServerBrowserTab::LoadEntries(), and ServerBrowserTab::OnLoadServersAsyncPC().

◆ PressA()

void PressA ( )
protected

Definition at line 280 of file ServerBrowserTab.c.

281 {
282
283 }

◆ PressSholderLeft()

void PressSholderLeft ( )
protected

◆ PressSholderRight()

void PressSholderRight ( )
protected

◆ PressX()

void PressX ( )
protected

Definition at line 285 of file ServerBrowserTab.c.

286 {
287 if (m_Menu.GetServersLoadingTab() == TabType.NONE)
288 RefreshList();
289 }
void RefreshList()

References m_Menu, and ServerBrowserTab::RefreshList().

◆ PressY()

void PressY ( )
protected

◆ RefreshList()

void RefreshList ( )
protected

Definition at line 385 of file ServerBrowserTab.c.

386 {
387 m_Menu.SetServersLoadingTab(m_TabType);
388
389 m_LoadingFinished = false;
390 m_Initialized = true;
391 m_BegunLoading = false;
393 m_TotalPages = -1;
394 m_TotalServers = 0;
397
398 m_EntryWidgets.Clear();
399
400#ifndef PLATFORM_WINDOWS // XBOX OR PS
401 m_CurrentFilterInput = m_Filters.GetFilterOptionsConsoles();
404 m_CurrentFilterInput.m_SortOrder = m_SortOrder;
405#else // PLATFORM_WINDOWS
406 m_CurrentFilterInput = m_Filters.GetFilterOptionsPC();
407#ifdef PLATFORM_CONSOLE // PC client with -XBOX flag
409#else
410 m_CurrentFilterInput.m_Page = 0;
411#endif
412#endif
413
414 m_Loading = true;
415 switch (m_TabType)
416 {
417 case TabType.OFFICIAL:
418 {
419 m_CurrentFilterInput.SetOfficialFilter(true);
421 break;
422 }
423 case TabType.COMMUNITY:
424 {
425 m_CurrentFilterInput.SetOfficialFilter(false);
427 break;
428 }
429 case TabType.LAN:
430 {
431 m_CurrentFilterInput.SetLAN();
433 break;
434 }
435 }
436 }
int m_CurrentLoadedPage
bool m_BegunLoading
int m_TotalLoadedServers
string GetSortOption()
bool m_Loading
ESortOrder m_SortOrder
int m_TotalServers
int GetCurrentPage()

References GetCurrentPage(), GetSortOption(), OnlineServices::LoadServers(), m_BegunLoading, m_CurrentFilterInput, m_CurrentLoadedPage, m_EntryWidgets, m_Filters, m_Initialized, m_LastLoadedPage, m_Loading, m_LoadingFinished, m_Menu, m_SortOrder, m_TabType, m_TotalLoadedServers, m_TotalPages, and m_TotalServers.

Referenced by ServerBrowserTab::ApplyFilters(), and ServerBrowserTab::PressX().

◆ ResetFilters()

void ResetFilters ( )
protected

Definition at line 370 of file ServerBrowserTab.c.

371 {
372 m_Filters.ResetFilters();
373 }

References m_Filters.

Referenced by ServerBrowserTab::OnClick().

◆ Right()

void Right ( )
protected

◆ RightHold()

void RightHold ( )
protected

◆ RightRelease()

void RightRelease ( )
protected

◆ ScrollToEntry()

void ScrollToEntry ( ServerBrowserEntry entry)
protected

Definition at line 130 of file ServerBrowserTab.c.

131 {
132 if (entry)
133 {
134 float x, y;
135 float x_s, y_s;
136 float x_l, y_l;
137
138 Widget root = entry.GetRoot();
139 Widget first_child = root.GetParent().GetChildren();
141 while (last_child)
142 {
143 if (last_child.GetSibling())
144 last_child = last_child.GetSibling();
145 else
146 break;
147 }
148
149 root.GetParent().Update();
150 root.Update();
151
152 m_ServerListScroller.GetScreenPos(x, y);
153 m_ServerListScroller.GetScreenSize(x_s, y_s);
154
155 float bottom_pos = y + y_s;
156
157 root.GetScreenPos(x_l, y_l);
158 root.GetScreenSize(x_s, y_s);
159
160 if (root == first_child)
161 m_ServerListScroller.VScrollToPos01(0);
162 else if (root == last_child)
163 m_ServerListScroller.VScrollToPos01(1);
164 else if (y_l + y_s >= bottom_pos)
165 m_ServerListScroller.VScrollToPos(m_ServerListScroller.GetVScrollPos() + y_s);
166 else if (y_l <= y)
167 m_ServerListScroller.VScrollToPos(m_ServerListScroller.GetVScrollPos() - y_s);
168 }
169 }
Icon x
Icon y
ScrollWidget m_ServerListScroller

References m_ServerListScroller, x, and y.

Referenced by Focus(), ServerBrowserTab::Focus(), SelectServer(), and ServerBrowserTab::SelectServer().

◆ SelectServer()

void SelectServer ( ServerBrowserEntry server)
protected

Definition at line 447 of file ServerBrowserTab.c.

448 {
449#ifdef PLATFORM_CONSOLE
451#endif
452
454
455 if (!m_Menu)
456 return;
457
458 m_Menu.SelectServer(server);
459 }

References m_Menu, m_SelectedServer, and ScrollToEntry().

Referenced by UIScriptedMenu::Connect().

◆ ServerBrowserTab()

void ServerBrowserTab ( Widget parent,
ServerBrowserMenuNew menu,
TabType type )
protected

Definition at line 71 of file ServerBrowserTab.c.

72 {
73 Construct(parent, menu, type);
75 GetGame().GetContentDLCService().m_OnChange.Insert(OnDLCChange);
76 }
void Construct(Widget parent, ServerBrowserMenuNew menu, TabType type)
ref set< string > m_OnlineFavServers
void OnDLCChange(EDLCId dlcId)
proto native CGame GetGame()

References ServerBrowserTab::Construct(), GetGame(), m_OnlineFavServers, and OnDLCChange().

◆ ServerListFocus()

void ServerListFocus ( bool focus,
bool favorite )
protected

Definition at line 197 of file ServerBrowserTab.c.

198 {
200
201 if (!m_Menu)
202 return;
203
204 m_Menu.ServerListFocus(focus, favorite);
205 }

References m_Menu, and m_SelectedPanel.

◆ SetCurrentPage()

◆ SetPanelFocus()

void SetPanelFocus ( )
protected

Definition at line 275 of file ServerBrowserTab.c.

276 {
277
278 }

◆ SetSort()

void SetSort ( ESortType type,
ESortOrder order )
protected

Definition at line 471 of file ServerBrowserTab.c.

472 {
474 m_SortType = type;
475 }

References m_SortOrder, and m_SortType.

◆ Unfavorite()

void Unfavorite ( string uid)
protected

Definition at line 562 of file ServerBrowserTab.c.

563 {
564 ServerBrowserEntry entry;
565 if (m_EntryWidgets.Find(uid, entry))
566 entry.SetFavorite(false);
567 }

References m_EntryWidgets.

◆ Up()

void Up ( )
protected

◆ ~ServerBrowserTab()

void ~ServerBrowserTab ( )
protected

Definition at line 86 of file ServerBrowserTab.c.

87 {
88 if (m_Filters)
89 m_Filters.SaveFilters();
90
91 if (m_Root)
92 delete m_Root;
93
94 if (GetGame().GetContentDLCService())
95 GetGame().GetContentDLCService().m_OnChange.Remove(OnDLCChange);
96 }

References GetGame(), m_Filters, m_Root, and OnDLCChange().

Variable Documentation

◆ BROWSER

enum TabType BROWSER

◆ FILTERS

enum TabType FILTERS

◆ m_ApplyFilter

◆ m_BegunLoading

bool m_BegunLoading
protected

Definition at line 39 of file ServerBrowserTab.c.

Referenced by RefreshList().

◆ m_BtnPageNext

◆ m_BtnPagePrev

◆ m_CurrentFilterInput

◆ m_CurrentLoadedPage

int m_CurrentLoadedPage
protected

Definition at line 49 of file ServerBrowserTab.c.

Referenced by RefreshList().

◆ m_CurrentPageNum

int m_CurrentPageNum
protected

◆ m_CurrentSelectedServer

string m_CurrentSelectedServer
protected

Definition at line 48 of file ServerBrowserTab.c.

Referenced by Focus(), and ServerBrowserTab::Focus().

◆ m_EntriesSorted

◆ m_EntryMods

◆ m_EntryWidgets

◆ m_Filters

◆ m_FiltersChanged

Widget m_FiltersChanged
protected

◆ m_FilterSearchText

◆ m_FilterSearchTextBox

◆ m_HostSort

◆ m_Initialized

bool m_Initialized
protected

Definition at line 38 of file ServerBrowserTab.c.

◆ m_LastLoadedPage

int m_LastLoadedPage
protected

◆ m_Loading

◆ m_LoadingFinished

◆ m_LoadingText

◆ m_Menu

ServerBrowserMenuNew m_Menu
protected

Definition at line 30 of file ServerBrowserTab.c.

Referenced by AddFavoritesToFilter(), ScriptedWidgetEventHandler::Apply(), array::ClearAlternativeKeybind(), ScriptedWidgetEventHandler::ClearAlternativeKeybind(), array::ClearKeybind(), ScriptedWidgetEventHandler::ClearKeybind(), Connect(), ServerBrowserTab::Construct(), CTObjectFollower::CTActor(), ScriptedWidgetEventHandler::CTEvent(), ScriptedWidgetEventHandler::CTKeyframe(), ScriptedWidgetEventHandler::EnterKeybindingMenu(), GetRootMenu(), array::KeybindingsContainer(), ScriptedWidgetEventHandler::KeybindingsGroup(), ServerBrowserTab::LoadEntries(), ServerBrowserTab::LoadEntries(), ServerBrowserTabConsolePages::LoadExtraEntries(), ServerBrowserTabPc::LoadExtraEntries(), ServerBrowserTab::LoadingServersStop(), ScriptedWidgetEventHandler::ModsMenuDetailed(), ScriptedWidgetEventHandler::OnAOChanged(), ScriptedWidgetEventHandler::OnATOCChanged(), ScriptedWidgetEventHandler::OnBrightnessChanged(), ScriptedWidgetEventHandler::OnClick(), ScriptedWidgetEventHandler::OnColorDepthChanged(), ScriptedWidgetEventHandler::OnDisplayModeChanged(), OnFilterFocus(), OnFilterFocusLost(), ScriptedWidgetEventHandler::OnFocus(), ScriptedWidgetEventHandler::OnHWAAChanged(), ServerBrowserTab::OnLoadServersAsyncConsole(), ServerBrowserTabConsolePages::OnLoadServersAsyncFinished(), ServerBrowserTab::OnLoadServersAsyncFinished(), ServerBrowserTab::OnLoadServersAsyncPC(), ScriptedWidgetEventHandler::OnMouseButtonDown(), ScriptedWidgetEventHandler::OnMouseButtonUp(), ScriptedWidgetEventHandler::OnMouseEnter(), ScriptedWidgetEventHandler::OnMouseLeave(), ScriptedWidgetEventHandler::OnObjectDetailChanged(), ScriptedWidgetEventHandler::OnOverallQualityChanged(), ScriptedWidgetEventHandler::OnPPAAChanged(), ScriptedWidgetEventHandler::OnPPQualityChanged(), ScriptedWidgetEventHandler::OnResolutionChanged(), ScriptedWidgetEventHandler::OnShadowDetailChanged(), ScriptedWidgetEventHandler::OnSSRQualityChanged(), ScriptedWidgetEventHandler::OnTerrainDetailChanged(), ScriptedWidgetEventHandler::OnTerrainSurfaceDetailChanged(), ScriptedWidgetEventHandler::OnTextureDetailChanged(), ScriptedWidgetEventHandler::OnTextureFilteringChanged(), ScriptedWidgetEventHandler::OnVSyncChanged(), ScriptedWidgetEventHandler::OptionsMenuControls(), ScriptedWidgetEventHandler::OptionsMenuGame(), ScriptedWidgetEventHandler::OptionsMenuSounds(), ScriptedWidgetEventHandler::OptionsMenuVideo(), ServerBrowserTabConsolePages::PassFilter(), PassFilter(), ScriptedWidgetEventHandler::Play(), PressX(), ServerBrowserTab::PressY(), RefreshList(), ServerBrowserTab::RefreshList(), ScriptedWidgetEventHandler::ReloadOptions(), SelectServer(), ServerBrowserTab::SelectServer(), ServerListFocus(), ServerBrowserTabConsolePages::SetFocusFilters(), ServerBrowserTab::SetFocusServers(), array::StartEnteringAlternateKeybind(), ScriptedWidgetEventHandler::StartEnteringAlternateKeybind(), array::StartEnteringKeybind(), ScriptedWidgetEventHandler::StartEnteringKeybind(), ScriptedWidgetEventHandler::Stop(), ScriptedWidgetEventHandler::TutorialKeybinds(), array::Update(), ScriptedWidgetEventHandler::Update(), ScriptedWidgetEventHandler::UpdateAdminOption(), ScriptedWidgetEventHandler::UpdateBleedingIndication(), ScriptedWidgetEventHandler::UpdateConnectivityInfo(), ScriptedWidgetEventHandler::UpdateCrosshairOption(), ScriptedWidgetEventHandler::UpdateEffects(), ScriptedWidgetEventHandler::UpdateFOVOption(), ScriptedWidgetEventHandler::UpdateGameOption(), ScriptedWidgetEventHandler::UpdateHUDBrightnessOption(), ScriptedWidgetEventHandler::UpdateHUDOption(), ScriptedWidgetEventHandler::UpdateInputMode(), ScriptedWidgetEventHandler::UpdateLanguageOption(), ScriptedWidgetEventHandler::UpdateMaster(), ScriptedWidgetEventHandler::UpdateMouseAimModHSensitivity(), ScriptedWidgetEventHandler::UpdateMouseAimModVSensitivity(), ScriptedWidgetEventHandler::UpdateMouseHSensitivity(), ScriptedWidgetEventHandler::UpdateMouseInvertView(), ScriptedWidgetEventHandler::UpdateMouseVSensitivity(), ScriptedWidgetEventHandler::UpdateMusic(), ScriptedWidgetEventHandler::UpdatePauseOption(), ScriptedWidgetEventHandler::UpdatePlayerOption(), ScriptedWidgetEventHandler::UpdateQuickbarOption(), ScriptedWidgetEventHandler::UpdateServerInfoOption(), ScriptedWidgetEventHandler::UpdateVOIP(), and ScriptedWidgetEventHandler::UpdateVOIPThreshold().

◆ m_OnlineFavServers

◆ m_PingSort

◆ m_PopulationSort

Widget m_PopulationSort
protected

◆ m_RefreshList

◆ m_ResetFilters

Widget m_ResetFilters
protected

◆ m_Root

enum TabType m_Root

◆ m_SelectedPanel

◆ m_SelectedServer

ServerBrowserEntry m_SelectedServer
protected

◆ m_ServerList

◆ m_ServerListScroller

◆ m_SlotsSort

◆ m_SortInverted

◆ m_SortOrder

ESortOrder m_SortOrder
protected

◆ m_SortType

◆ m_TabType

◆ m_TimeSort

◆ m_TotalLoadedServers

◆ m_TotalPages

◆ m_TotalServers

int m_TotalServers
protected

Definition at line 41 of file ServerBrowserTab.c.

Referenced by ServerBrowserTab::OnLoadServersAsyncConsole(), and RefreshList().