7 const string WIDGET_CONTENT =
"ServerBrowserContent";
10 const string WIDGET_TAB_VIEW =
"TabView";
11 const string WIDGET_FILTER =
"FilterPanel";
12 const string WIDGET_SERVER_HEADER =
"SortingHeader";
13 const string WIDGET_SORT_SESSION_NAME =
"sortName";
14 const string WIDGET_SORT_SESSION_FAVORITE =
"sortFavourite";
15 const string WIDGET_SEARCH =
"m_FilterSearch";
16 const string WIDGET_SCROLL_LAYOUT =
"ScrollLayout0";
17 const string WIDGET_SERVER_SCENARIO_DETAILS_PANEL =
"ServerScenarioDetailsPanel";
18 const string WIDGET_SERVERS_FEEDBACK =
"txtServersFeedback";
19 const string WIDGET_LOADING_SERVERS =
"LoadingServers";
20 const string WIDGET_SCROLLABLE_LIST =
"vServerListView";
23 const string WIDGET_BUTTON_JOIN =
"BtnQuickJoin";
24 const string WIDGET_BUTTON_DETAILS =
"BtnDetails";
25 const string WIDGET_BUTTON_FAVORITE =
"BtnFavorite";
26 const string WIDGET_BUTTON_HOST =
"HostNewServerButton";
27 const string WIDGET_BUTTON_REFRESH =
"RefreshButton";
28 const string WIDGET_BUTTON_DIRECTJOIN =
"BtnManualConnect";
29 const string WIDGET_BUTTON_FILTER =
"Filter";
32 static string WIDGET_PANEL_EMPTY =
"MenuPanelEmpty";
33 static string WIDGET_MESSAGE_WRAP =
"SimpleMessageWrap";
34 static string WIDGET_MESSAGE_LIST =
"SimpleMessageList";
41 Widget m_wSearchEditBox;
42 Widget m_wButtonConnect;
43 Widget m_wControllerActionsOverlay;
44 TextWidget m_wTxtServersFeedback;
45 Widget m_wLoadingServers;
46 Widget m_wSortSessionName;
47 Widget m_wSortSessionFavorite;
49 Widget m_wHostNewServerButton;
59 ref array<SCR_InputButtonComponent> m_aEntryButtons = {};
63 void FindAllWidgets(Widget root)
67 m_wPanelEmpty =
m_wRoot.FindAnyWidget(WIDGET_PANEL_EMPTY);
69 m_wSearchEditBox =
m_wRoot.FindAnyWidget(WIDGET_SEARCH);
71 m_wTxtServersFeedback = TextWidget.Cast(
m_wRoot.FindAnyWidget(WIDGET_SERVERS_FEEDBACK));
73 m_wLoadingServers =
m_wRoot.FindAnyWidget(WIDGET_LOADING_SERVERS);
75 m_wSortSessionName =
m_wRoot.FindAnyWidget(WIDGET_SORT_SESSION_NAME);
76 m_wSortSessionFavorite =
m_wRoot.FindAnyWidget(WIDGET_SORT_SESSION_FAVORITE);
78 m_wHostNewServerButton =
m_wRoot.FindAnyWidget(WIDGET_BUTTON_HOST);
79 if (m_wHostNewServerButton)
83 m_JoinButton = FindButton(WIDGET_BUTTON_JOIN);
84 m_DetailsButton = FindButton(WIDGET_BUTTON_DETAILS);
85 m_FavoritesButton = FindButton(WIDGET_BUTTON_FAVORITE);
87 m_aEntryButtons.Insert(m_JoinButton);
88 m_aEntryButtons.Insert(m_DetailsButton);
89 m_aEntryButtons.Insert(m_FavoritesButton);
92 m_RefreshButton = FindButton(WIDGET_BUTTON_REFRESH);
93 m_DirectJoinButton = FindButton(WIDGET_BUTTON_DIRECTJOIN);
94 m_FilterButton = FindButton(WIDGET_BUTTON_FILTER);
100 Widget button =
m_wRoot.FindAnyWidget(name);
112 ScriptedWidgetEventHandler FindHandlerReference(out Widget target,
string targetName,
typename typeName, Widget parent =
null)
114 typename type = ScriptedWidgetEventHandler;
121 target = parent.FindAnyWidget(targetName);
126 string error =
string.Format(
"Could not find widget of NAME: %1 of PARENT: %2", targetName, parent);
127 Print(error, LogLevel.ERROR);
133 return target.FindHandler(typeName);