28 protected ref ServerBrowserFilterContainer
m_Filters;
30 protected ServerBrowserMenuNew
m_Menu;
119 foreach (ServerBrowserEntry entry : serverEntries)
121 entry.RefreshDLCIcon();
139 Widget root = entry.GetRoot();
140 Widget first_child = root.GetParent().GetChildren();
141 Widget last_child = first_child;
144 if ( last_child.GetSibling() )
145 last_child = last_child.GetSibling();
150 root.GetParent().Update();
156 float bottom_pos =
y + y_s;
158 root.GetScreenPos( x_l, y_l );
159 root.GetScreenSize( x_s, y_s );
161 if ( root == first_child )
165 else if ( root == last_child )
169 else if ( y_l + y_s >= bottom_pos )
192 m_Menu.FilterFocus(
false );
198 m_Menu.FilterFocus(
true );
213 m_Menu.ServerListFocus( focus, favorite );
330 Widget sibling = focused.GetSibling();
334 if ( focused.GetName() ==
"server_browser_list_entry_root" )
339 SetFocus( focused.GetParent().GetSibling().GetChildren() );
346 if ( focused && focused.GetName() ==
"server_browser_list_entry_root" )
348 Widget sibling = focused.GetParent().GetChildren();
349 if ( focused == sibling )
354 if ( sibling && sibling.GetSibling() == focused )
360 sibling = sibling.GetSibling();
403 m_Menu.AddFavoritesToFilter( input );
421#ifndef PLATFORM_CONSOLE
465#ifdef PLATFORM_CONSOLE
474 m_Menu.SelectServer( server );
517 if (
m_Filters.m_PreviouslyPlayedFilter.IsSet() )
519 bool is_visited =
g_Game.IsVisited( result.m_HostIp, result.m_HostPort );
521 if ( !is_visited &&
m_Filters.m_PreviouslyPlayedFilter.IsEnabled() )
526 if ( is_visited &&
m_Filters.m_PreviouslyPlayedFilter.IsEnabled() )
567 return "currentNumberPlayers";
588 ServerBrowserEntry entry;
591 entry.SetFavorite(
false );
615 if ( w.IsInherited( ButtonWidget ) )
617 ButtonWidget button = ButtonWidget.Cast( w );
618 button.SetTextColor(
ARGB( 255, 200, 0, 0 ) );
621 w.SetColor(
ARGB( 255, 0, 0, 0) );
626 ImageWidget image = ImageWidget.Cast( w.FindAnyWidget( w.GetName() +
"_image" ) );
627 Widget option =
Widget.Cast( w.FindAnyWidget( w.GetName() +
"_option_wrapper" ) );
628 Widget option_label = w.FindAnyWidget(
"option_label" );
632 text1.SetColor(
ARGB( 255, 255, 0, 0 ) );
637 text2.SetColor(
ARGB( 255, 255, 0, 0 ) );
642 text3.SetColor(
ARGB( 255, 255, 0, 0 ) );
648 image.SetColor(
ARGB( 255, 200, 0, 0 ) );
653 option.SetColor(
ARGB( 255, 255, 0, 0 ) );
658 option_label.SetColor(
ARGB( 255, 255, 0, 0 ) );
669 if ( w.IsInherited( ButtonWidget ) )
671 ButtonWidget button = ButtonWidget.Cast( w );
672 button.SetTextColor(
ARGB( 255, 255, 255, 255 ) );
678 ImageWidget image = ImageWidget.Cast( w.FindAnyWidget( w.GetName() +
"_image" ) );
679 Widget option = w.FindAnyWidget( w.GetName() +
"_option_wrapper" );
680 Widget option_label = w.FindAnyWidget(
"option_label" );
684 text1.SetColor(
ARGB( 255, 255, 255, 255 ) );
689 text2.SetColor(
ARGB( 255, 255, 255, 255 ) );
694 text3.SetColor(
ARGB( 255, 255, 255, 255 ) );
700 image.SetColor(
ARGB( 255, 255, 255, 255 ) );
705 option.SetColor(
ARGB( 150, 255, 255, 255 ) );
710 option_label.SetColor(
ARGB( 255, 255, 255, 255 ) );
716 #ifdef PLATFORM_WINDOWS
722 ButtonWidget button = ButtonWidget.Cast( w );
EBiosError
Possible Error codes for bios API. This is the list of errors that can be returned from bios API....
protected Widget m_SlotsSort
protected int m_CurrentLoadedPage
protected int m_LastLoadedPage
protected Widget m_PopulationSort
protected ref ServerBrowserFilterContainer m_Filters
protected ServerBrowserMenuNew m_Menu
protected Widget m_ResetFilters
protected int m_CurrentPageNum
protected int m_TotalPages
protected TextWidget m_LoadingText
protected void LoadExtraEntries(int index)
void ButtonDisable(Widget w)
protected ref map< ESortType, ref array< ref GetServersResultRow > > m_EntriesSorted
void ServerListFocus(bool focus, bool favorite)
bool IsPingInRange(int ping, string max_ping)
bool GetIsServerLoadingFinished()
void ScrollToEntry(ServerBrowserEntry entry)
protected string m_CurrentSelectedServer
protected ref map< string, ref ServerBrowserEntry > m_EntryWidgets
void Connect(ServerBrowserEntry server)
protected int m_TotalServers
protected TabType m_TabType
bool PassFilter(GetServersResultRow result)
protected ref map< ESortType, ESortOrder > m_SortInverted
protected Widget m_ApplyFilter
protected ref GetServersInput m_CurrentFilterInput
protected ESortOrder m_SortOrder
protected Widget m_RefreshList
protected Widget m_TimeSort
protected bool m_LoadingFinished
void AddFavoritesToFilter(ref GetServersInput input)
protected Widget m_HostSort
protected ESortType m_SortType
protected int m_TotalLoadedServers
void Unfavorite(string uid)
protected ref map< string, ref array< string > > m_EntryMods
void ButtonEnable(Widget w)
protected Widget m_FilterSearchText
protected SpacerBaseWidget m_ServerList
protected SelectedPanel m_SelectedPanel
override bool OnFocusLost(Widget w, int x, int y)
protected Widget m_FiltersChanged
protected ServerBrowserEntry m_SelectedServer
protected ButtonWidget m_BtnPagePrev
protected bool m_BegunLoading
protected Widget m_FilterSearchTextBox
override bool OnFocus(Widget w, int x, int y)
protected ButtonWidget m_BtnPageNext
protected ScrollWidget m_ServerListScroller
void SetCurrentPage(int page_num)
protected ref set< string > m_OnlineFavServers
void OnDLCChange(EDLCId dlcId)
protected Widget m_PingSort
ServerBrowserMenuNew GetRootMenu()
protected bool m_Initialized
proto native ContentDLC GetContentDLCService()
Return DLC service (service for entitlement keys for unlock content)
static int COLOR_DISABLED_TEXT
ref ScriptInvoker m_OnChange
void(EDLCId dlcId)
GetServersResult the output structure of the GetServers operation.
static void LoadServers(notnull GetServersInput inputValues)
proto bool Remove(func fn, int flags=EScriptInvokerRemoveFlags.ALL)
remove specific call from list
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
override bool IsFocusable(Widget w)
override void ColorDisable(Widget w)
override void OnLoadServersAsyncPC(ref GetServersResult result_list, EBiosError error, string response)
override void OnFilterChanged()
override void OnFilterFocus(Widget w)
override void RefreshList()
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
override void SetSort(ESortType type, ESortOrder order)
override void OnFilterFocusLost(Widget w)
override void PressSholderLeft()
override int AddSorted(GetServersResultRow entry)
override void PressSholderRight()
override void ColorNormal(Widget w)
override void ApplyFilters()
override void OnLoadServerModsAsync(string server_id, array< string > mods)
protected override void Construct(Widget parent, ServerBrowserMenuNew menu, TabType type)
override void RightRelease()
override bool OnMouseEnter(Widget w, int x, int y)
override void LeftRelease()
override void SelectServer(ServerBrowserEntry server)
override void RightHold()
override bool OnClick(Widget w, int x, int y, int button)
override void ResetFilters()
override void ColorHighlight(Widget w)
override void OnLoadServersAsyncConsole(GetServersResult result_list, EBiosError error, string response)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int ToInt()
Converts string to integer.
proto native int Length()
Returns length of string.
int ARGB(int a, int r, int g, int b)