DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ServerBrowserTabPc

Защищенные члены

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

Закрытые члены

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

Закрытые данные

ref array< ref CachedServerInfom_CachedFavoriteServerInfo
 

Подробное описание

Методы

◆ Construct()

override void Construct ( Widget parent,
ServerBrowserMenuNew menu,
TabType type )
inlineprotected
7 {
9
10 super.Construct(parent, menu, type);
11 }
Definition EntityAI.c:95
ref array< ref CachedServerInfo > m_CachedFavoriteServerInfo
Definition ServerBrowserFavoritesTabPc.c:4

◆ GetConnEndPoint()

string GetConnEndPoint ( CachedServerInfo cachedInfo)
inlineprivate
89 {
90 string ip = cachedInfo.param1;
91 int connPort = cachedInfo.param3;
92 return ip + ":" + connPort;
93 }

◆ GetQueryEndPoint()

string GetQueryEndPoint ( CachedServerInfo cachedInfo)
inlineprivate
96 {
97 string ip = cachedInfo.param1;
98 int queryPort = cachedInfo.param4;
99 return ip + ":" + queryPort;
100 }

◆ LoadExtraEntries()

override void LoadExtraEntries ( int index)
inlineprotected
14 {
17 {
19
20 // ensure the cached server is still favorited
21 if (!m_Menu.IsFavorited(GetQueryEndPoint(cachedInfo)))
22 {
23 continue;
24 }
25
26 if (m_OnlineFavServers.Find(serverId) > -1)
27 {
28 continue;
29 }
30
32 }
33
34 // adding FAVORITED, OFFLINE servers to favorites tab
35 int totalServersAlreadyShown = m_PageIndex * SERVERS_VISIBLE_COUNT + index;
38 for (int i = startingIndex; i < relevantCachedInfo.Count(); ++i)
39 {
40 if (index >= SERVERS_VISIBLE_COUNT)
41 {
42 break;
43 }
44
46
47 cachedInfo = relevantEntry.param2;
48 string ip = cachedInfo.param1;
49 string cachedName = cachedInfo.param2;
50 int connPort = cachedInfo.param3;
51 int queryPort = cachedInfo.param4;
52
53 // do NOT insert offlineRow into m_EntriesSorted[m_SortType]!!
54 // we assume that rows already in m_EntriesSorted[m_SortType] are ONLINE,
55 // if we add offline info to m_EntriesSorted[m_SortType] then we cannot differentiate
56 // between online and offline servers
58 offlineRow.m_Id = relevantEntry.param1;
59 offlineRow.m_Name = cachedName;
60 offlineRow.m_HostIp = ip;
61 offlineRow.m_SteamQueryPort = queryPort;
62 offlineRow.m_HostPort = connPort;
63 offlineRow.m_Favorite = true;
64 offlineRow.m_IsSelected = (offlineRow.m_Id == m_CurrentSelectedServer);
65
66 ServerBrowserEntry entry = GetServerEntryByIndex(index, offlineRow.m_Id);
67 entry.Show(true);
68 entry.SetIsOnline(false);
69 entry.FillInfo(offlineRow);
70 entry.UpdateEntry();
71
72 index++;
73 }
74 }
int m_TotalLoadedServers
Definition ServerBrowserTab.c:49
string m_CurrentSelectedServer
Definition ServerBrowserTab.c:55
ServerBrowserMenuNew m_Menu
Definition ServerBrowserTab.c:37
ref set< string > m_OnlineFavServers
Definition ServerBrowserTab.c:77
int m_PageIndex
Definition UiHintPanel.c:315
GetServersResultRow the output structure of the GetServers operation that represents one game server.
Definition BiosLobbyService.c:144
string GetQueryEndPoint(CachedServerInfo cachedInfo)
Definition ServerBrowserFavoritesTabPc.c:95
string GetConnEndPoint(CachedServerInfo cachedInfo)
Definition ServerBrowserFavoritesTabPc.c:88

Перекрестные ссылки m_CurrentSelectedServer, m_Menu, m_OnlineFavServers, m_PageIndex и m_TotalLoadedServers.

Используется в ServerBrowserTab::UpdateServerList().

◆ RefreshList()

override void RefreshList ( )
inlineprotected
77 {
79
80 m_OnlineFavServers.Clear();
81 super.RefreshList();
82
83 m_CurrentFilterInput.SetFavorited( true );
86 }
ref GetServersInput m_CurrentFilterInput
Definition ServerBrowserTab.c:57
void AddFavoritesToFilter(ref GetServersInput input)
Definition ServerBrowserTab.c:433
Definition OnlineServices.c:2
static void GetCachedFavServerInfo(array< ref CachedServerInfo > favServersInfoCache)
Definition OnlineServices.c:114
static void LoadServers(notnull GetServersInput inputValues)
Definition OnlineServices.c:96

Перекрестные ссылки AddFavoritesToFilter(), OnlineServices::GetCachedFavServerInfo(), OnlineServices::LoadServers(), m_CurrentFilterInput и m_OnlineFavServers.

Используется в ServerBrowserTab::ApplyFilters() и ServerBrowserTab::OnClick().

Поля

◆ m_CachedFavoriteServerInfo

ref array<ref CachedServerInfo> m_CachedFavoriteServerInfo
private

Объявления и описания членов класса находятся в файле: