DayZ 1.24
Loading...
Searching...
No Matches
ServerBrowserTabPc Class Reference
Collaboration diagram for ServerBrowserTabPc:
[legend]

Protected Member Functions

override void Construct (Widget parent, ServerBrowserMenuNew menu, TabType type)
 
override void LoadExtraEntries (int index)
 
override void RefreshList ()
 

Private Member Functions

string GetConnEndPoint (CachedServerInfo cachedInfo)
 
string GetQueryEndPoint (CachedServerInfo cachedInfo)
 

Private Attributes

ref array< ref CachedServerInfom_CachedFavoriteServerInfo
 

Detailed Description

Definition at line 1 of file ServerBrowserFavoritesTabPc.c.

Member Function Documentation

◆ Construct()

override void ServerBrowserTabPc::Construct ( Widget parent,
ServerBrowserMenuNew menu,
TabType type )
inlineprotected

Definition at line 6 of file ServerBrowserFavoritesTabPc.c.

7 {
9
10 super.Construct(parent, menu, type);
11 DisableFilters();
12 }
ref array< ref CachedServerInfo > m_CachedFavoriteServerInfo

◆ GetConnEndPoint()

string ServerBrowserTabPc::GetConnEndPoint ( CachedServerInfo cachedInfo)
inlineprivate

Definition at line 82 of file ServerBrowserFavoritesTabPc.c.

83 {
84 string ip = cachedInfo.param1;
85 int connPort = cachedInfo.param3;
86 return ip + ":" + connPort;
87 }

◆ GetQueryEndPoint()

string ServerBrowserTabPc::GetQueryEndPoint ( CachedServerInfo cachedInfo)
inlineprivate

Definition at line 89 of file ServerBrowserFavoritesTabPc.c.

90 {
91 string ip = cachedInfo.param1;
92 int queryPort = cachedInfo.param4;
93 return ip + ":" + queryPort;
94 }

◆ LoadExtraEntries()

override void ServerBrowserTabPc::LoadExtraEntries ( int index)
inlineprotected

Definition at line 14 of file ServerBrowserFavoritesTabPc.c.

15 {
18 {
20
21 // ensure the cached server is still favorited
22 if (!m_Menu.IsFavorited(GetQueryEndPoint(cachedInfo)))
23 continue;
24
25 if (m_OnlineFavServers.Find(serverId) > -1)
26 continue;
27
29 }
30
31 // adding FAVORITED, OFFLINE servers to favorites tab
32 int totalServersAlreadyShown = m_PageIndex * SERVERS_VISIBLE_COUNT + index;
35 for (int i = startingIndex; i < relevantCachedInfo.Count(); ++i)
36 {
37 if (index >= SERVERS_VISIBLE_COUNT)
38 break;
39
41
43 string ip = cachedInfo.param1;
44 string cachedName = cachedInfo.param2;
45 int connPort = cachedInfo.param3;
46 int queryPort = cachedInfo.param4;
47
48 // do NOT insert offlineRow into m_EntriesSorted[m_SortType]!!
49 // we assume that rows already in m_EntriesSorted[m_SortType] are ONLINE,
50 // if we add offline info to m_EntriesSorted[m_SortType] then we cannot differente
51 // between online and offline servers
53 offlineRow.m_Id = relevantEntry.param1;
54 offlineRow.m_Name = cachedName;
55 offlineRow.m_HostIp = ip;
56 offlineRow.m_SteamQueryPort = queryPort;
57 offlineRow.m_HostPort = connPort;
58 offlineRow.m_Favorite = true;
59
60 ServerBrowserEntry entry = GetServerEntryByIndex(index, offlineRow.m_Id);
61 entry.Show(true);
62 entry.SetIsOnline(false);
63 entry.FillInfo(offlineRow);
64 entry.UpdateEntry();
65
66 index++;
67 }
68 }
int m_TotalLoadedServers
ServerBrowserMenuNew m_Menu
ref set< string > m_OnlineFavServers
int m_PageIndex
string GetQueryEndPoint(CachedServerInfo cachedInfo)
string GetConnEndPoint(CachedServerInfo cachedInfo)

References m_Menu, m_OnlineFavServers, m_PageIndex, and m_TotalLoadedServers.

Referenced by ServerBrowserTab::UpdateServerList().

◆ RefreshList()

override void ServerBrowserTabPc::RefreshList ( )
inlineprotected

Definition at line 70 of file ServerBrowserFavoritesTabPc.c.

71 {
73
74 m_OnlineFavServers.Clear();
75 super.RefreshList();
76
77 m_CurrentFilterInput.SetFavorited(true);
80 }
ref GetServersInput m_CurrentFilterInput
void AddFavoritesToFilter(ref GetServersInput input)
static void LoadServers(notnull GetServersInput inputValues)
static void GetCachedFavServerInfo(array< ref CachedServerInfo > favServersInfoCache)

References AddFavoritesToFilter(), OnlineServices::GetCachedFavServerInfo(), OnlineServices::LoadServers(), m_CurrentFilterInput, and m_OnlineFavServers.

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

Member Data Documentation

◆ m_CachedFavoriteServerInfo

ref array<ref CachedServerInfo> ServerBrowserTabPc::m_CachedFavoriteServerInfo
private

Definition at line 4 of file ServerBrowserFavoritesTabPc.c.


The documentation for this class was generated from the following file: