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

◆ LoadFavoriteServers()

void UIScriptedMenu::LoadFavoriteServers ( )
inlineprotected

См. определение в файле ServerBrowserMenuNew.c строка 598

599 {
601
602#ifdef PLATFORM_WINDOWS
603 OnlineServices.GetFavoriteServers(m_Favorites);
604#else
605 GetGame().GetProfileStringList("SB_Favorites", m_Favorites);
606
607 // ignore any ids that do not follow correct IP:PORT format
608 for (int i = 0; i < m_Favorites.Count(); ++i)
609 {
610 string id = m_Favorites[i];
611 array<string> output = new array<string>;
612
613 id.Split(":", output);
614 if (output.Count() != 2)
615 {
616 m_Favorites.Remove(i);
617 --i;
618 }
619 }
620
621 // only handle MAX_FAVORITES on consoles
622 if (m_Favorites.Count() > MAX_FAVORITES)
623 {
624 // favorites are ordered by when they were favorited
625 // so keep most recent favorites and ignore oldest favorites
626 m_Favorites.Invert();
628 m_Favorites.Invert();
629 }
630#endif
631 }
const int MAX_FAVORITES
Определения ServerBrowserMenuNew.c:1
proto native void GetProfileStringList(string name, out TStringArray values)
Gets array of strings from profile variable.
ref TStringArray m_Favorites
Определения ServerBrowserMenuNew.c:26
proto native CGame GetGame()
array< string > TStringArray
Определения EnScript.c:685

Перекрестные ссылки OnlineServices::GetFavoriteServers(), GetGame(), CGame::GetProfileStringList(), m_Favorites и MAX_FAVORITES.

Используется в Init() и OnTabSwitch().