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

◆ LoadFavoriteServers()

void UIScriptedMenu::LoadFavoriteServers ( )
inlineprotected

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

607 {
609
610#ifdef PLATFORM_WINDOWS
611 OnlineServices.GetFavoriteServers(m_Favorites);
612#else
613 GetGame().GetProfileStringList("SB_Favorites", m_Favorites);
614
615 // ignore any ids that do not follow correct IP:PORT format
616 for (int i = 0; i < m_Favorites.Count(); ++i)
617 {
618 string id = m_Favorites[i];
619 array<string> output = new array<string>;
620
621 id.Split(":", output);
622 if (output.Count() != 2)
623 {
624 m_Favorites.Remove(i);
625 --i;
626 }
627 }
628
629 // only handle MAX_FAVORITES on consoles
630 if (m_Favorites.Count() > MAX_FAVORITES)
631 {
632 // favorites are ordered by when they were favorited
633 // so keep most recent favorites and ignore oldest favorites
634 m_Favorites.Invert();
636 m_Favorites.Invert();
637 }
638#endif
639 }
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:709

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

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