Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
serverbrowsertab.c
Go to the documentation of this file.
9
10enum SelectedPanel
11{
15 DETAILS
16}
17
18enum ServerBrowserRightAreaView
19{
20 FILTERS,
21 DETAILS
22}
23
25{
26 protected Widget m_Root;
27 protected ScrollWidget m_ServerListScroller;
28 protected SpacerBaseWidget m_ServerList;
29
30 //protected ref array<ref GetServersResultRow> m_Entries;
31
34
35 protected ref ServerBrowserFilterContainer m_Filters;
36
37 protected ServerBrowserMenuNew m_Menu;
38 protected ServerBrowserEntry m_SelectedServer;
39
40 protected TabType m_TabType;
43
44 protected SelectedPanel m_SelectedPanel;
45 protected bool m_Initialized;
46 protected bool m_BegunLoading;
47 protected bool m_Loading;
48 protected int m_TotalServers; // UNUSED
49 protected int m_TotalLoadedServers;
50 protected int m_LastLoadedPage;
51 protected int m_TotalPages;
52 protected bool m_LoadingFinished;
53 protected int m_CurrentPageNum;
54
55 protected string m_CurrentSelectedServer;
56 protected int m_CurrentLoadedPage;
58
63 protected Widget m_HostSort;
64 protected Widget m_TimeSort;
67 protected Widget m_PingSort;
68 protected Widget m_MapSort;
72 protected ButtonWidget m_BtnPagePrev;
73 protected ButtonWidget m_BtnPageNext;
74
77 protected ref set<string> m_OnlineFavServers;
78
82 protected ButtonWidget m_BtnShowDetails;
83
85 protected ButtonWidget m_BtnShowFilters;
86
87 protected ref ServerBrowserDetailsContainer m_Details;
88
89#ifdef DIAG_DEVELOPER
90 protected ref GetServersResult m_DummyServers;
91 protected static bool m_DummyServersEnabled;
92#endif
93
94 void ServerBrowserTab(Widget parent, ServerBrowserMenuNew menu, TabType type)
95 {
96 Construct(parent, menu, type);
97 m_OnlineFavServers = new set<string>();
98 GetGame().GetContentDLCService().m_OnChange.Insert(OnDLCChange);
99 }
100
101 protected void Construct(Widget parent, ServerBrowserMenuNew menu, TabType type)
102 {
106 m_LoadingText = TextWidget.Cast(m_Root.FindAnyWidget("loading_servers_info"));
107 }
108
110 {
111 if ( m_Filters )
112 m_Filters.SaveFilters();
113
114 if (m_Root)
115 delete m_Root;
116
117 if (GetGame().GetContentDLCService())
118 GetGame().GetContentDLCService().m_OnChange.Remove(OnDLCChange);
119
120 #ifdef DIAG_DEVELOPER
121 PluginDiagMenuClient.GetSBDummyServersInvoker().Remove(OnDummyServersEnabledChanged);
122 #endif
123 }
124
125 ServerBrowserMenuNew GetRootMenu()
126 {
127 return m_Menu;
128 }
129
131 {
132 return m_LoadingFinished;
133 }
134
136 {
137 return m_Loading;
138 }
139
140 void OnDLCChange(EDLCId dlcId)
141 {
142 switch (dlcId)
143 {
144 case EDLCId.DLC_FROSTLINE:
145 {
146 array<ServerBrowserEntry> serverEntries = m_EntryWidgets.GetValueArray();
147 foreach (ServerBrowserEntry entry : serverEntries)
148 {
149 entry.RefreshDLCIcon();
150 }
151 break;
152 }
153
154 default:
155 break;
156 }
157 }
158
159 void ScrollToEntry( ServerBrowserEntry entry )
160 {
161 if ( entry )
162 {
163 float x, y;
164 float x_s, y_s;
165 float x_l, y_l;
166
167 Widget root = entry.GetRoot();
168 Widget first_child = root.GetParent().GetChildren();
169 Widget last_child = first_child;
170 while ( last_child )
171 {
172 if ( last_child.GetSibling() )
173 last_child = last_child.GetSibling();
174 else
175 break;
176 }
177
178 root.GetParent().Update();
179 root.Update();
180
181 m_ServerListScroller.GetScreenPos( x, y );
182 m_ServerListScroller.GetScreenSize( x_s, y_s );
183
184 float bottom_pos = y + y_s;
185
186 root.GetScreenPos( x_l, y_l );
187 root.GetScreenSize( x_s, y_s );
188
189 if ( root == first_child )
190 {
191 m_ServerListScroller.VScrollToPos01( 0 );
192 }
193 else if ( root == last_child )
194 {
195 m_ServerListScroller.VScrollToPos01( 1 );
196 }
197 else if ( y_l + y_s >= bottom_pos )
198 {
199 m_ServerListScroller.VScrollToPos( m_ServerListScroller.GetVScrollPos() + y_s );
200 }
201 else if ( y_l <= y )
202 {
203 m_ServerListScroller.VScrollToPos( m_ServerListScroller.GetVScrollPos() - y_s );
204 }
205 }
206 }
207
218
220 {
221 m_SelectedPanel = SelectedPanel.FILTERS;
222 m_Menu.FilterFocus(false);
223 }
224
226 {
227 m_SelectedPanel = SelectedPanel.FILTERS;
228 m_Menu.FilterFocus(true);
229 }
230
232 {
233 m_SelectedPanel = SelectedPanel.DETAILS;
234 m_Menu.DetailsFocus(false);
235 }
236
238 {
239 m_SelectedPanel = SelectedPanel.DETAILS;
240 m_Menu.DetailsFocus(true);
241 }
242
244
245 void ServerListFocus(bool focus, bool favorite)
246 {
247 if (!m_Menu)
248 return;
249
250 m_Menu.ServerListFocus(focus, favorite);
251 }
252
253 override bool OnFocus(Widget w, int x, int y)
254 {
255 if (IsFocusable(w))
256 {
257 if (w == m_FilterSearchTextBox)
258 {
260 return false;
261 }
262 else
263 {
265 }
266
267 #ifdef PLATFORM_CONSOLE
268 string aButtonLabel;
269 if (w == m_RefreshList || w == m_ApplyFilter || w == m_ResetFilters)
270 {
271 #ifdef PLATFORM_PS4
272 aButtonLabel = "#ps4_ingame_menu_select";
273 #else
274 aButtonLabel = "#layout_xbox_ingame_menu_select";
275 #endif
276 m_Menu.UpdateAButtonLabel(aButtonLabel);
277 }
278 else if (w != m_BtnShowFilters && w != m_BtnShowDetails)
279 {
280 aButtonLabel = "#dialog_change";
281 m_Menu.UpdateAButtonLabel(aButtonLabel);
282 }
283 else
284 {
285 m_Menu.ShowAButton(false);
286 }
287 #endif
288
289 return true;
290 }
291
292 return false;
293 }
294
295 override bool OnFocusLost(Widget w, int x, int y)
296 {
297 if (IsFocusable(w))
298 {
299 if (w == m_FilterSearchTextBox)
300 {
302 return true;
303 }
304 else
305 {
306 ColorNormal(w);
307 }
308 return true;
309 }
310 return false;
311 }
312
313 override bool OnMouseEnter(Widget w, int x, int y)
314 {
315 if (IsFocusable(w))
316 {
318 if (w == m_FilterSearchText)
319 {
321 return true;
322 }
323 return true;
324 }
325 return false;
326 }
327
328 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
329 {
330 if (IsFocusable(w))
331 {
332 if (enterW == m_FilterSearchText || enterW == m_FilterSearchTextBox)
333 {
334 }
335 else
336 {
337 ColorNormal(w);
338 }
339 return true;
340 }
341 return false;
342 }
343
345 {
346 if (w)
347 {
348 return (w == m_ApplyFilter || w == m_RefreshList || w == m_ResetFilters || w == m_FilterSearchText || w == m_FilterSearchTextBox || w == m_BtnShowDetails || w == m_BtnShowFilters);
349 }
350 return false;
351 }
352
353 // Unused?!
355
356 void PressA();
357
358 void PressX()
359 {
360 if ( m_Menu.GetServersLoadingTab() == TabType.NONE )
361 RefreshList();
362 }
363
364 void PressY();
368 void Left();
369 void LeftHold();
371 void Right();
372 void RightHold();
374 void Up();
375 void Down();
377
378 void OnLoadServerModsAsync(string server_id, array<string> mods)
379 {
380 m_EntryMods.Set( server_id, mods );
381 }
382
384 {
385 Widget focused = GetFocus();
386 if ( !focused )
387 return;
388 Widget sibling = focused.GetSibling();
389 if ( !sibling )
390 return;
391
392 if ( focused.GetName() == "server_browser_list_entry_root" )
393 {
394 if ( sibling )
395 SetFocus( focused.GetSibling() );
396 else
397 SetFocus( focused.GetParent().GetSibling().GetChildren() );
398 }
399 }
400
402 {
403 Widget focused = GetFocus();
404 if ( focused && focused.GetName() == "server_browser_list_entry_root" )
405 {
406 Widget sibling = focused.GetParent().GetChildren();
407 if ( focused == sibling )
408 return;
409
410 while ( sibling )
411 {
412 if ( sibling && sibling.GetSibling() == focused )
413 {
414 SetFocus( sibling );
415 }
416 else
417 {
418 sibling = sibling.GetSibling();
419 }
420 }
421 }
422 }
423
424 // Unused?!
426
427 // Unused?!
429
430 void SetCurrentPage(int page_num)
431 {
432 m_CurrentPageNum = page_num;
433 }
434
436 {
437 return m_CurrentPageNum;
438 }
439
441 {
443 }
444
446 {
447 m_Filters.ResetFilters();
448 }
449
451
453 {
454 m_Menu.AddFavoritesToFilter( input );
455 }
456
458 {
459 m_Menu.SetServersLoadingTab( m_TabType );
460
461 m_LoadingFinished = false;
462 m_Initialized = true;
463 m_BegunLoading = false;
465 m_TotalPages = -1;
466 m_TotalServers = 0;
469
470 m_Menu.DeselectCurrentServer();
471
472 m_EntryWidgets.Clear();
473
474 #ifndef PLATFORM_WINDOWS // XBOX OR PS
475 m_CurrentFilterInput = m_Filters.GetFilterOptionsConsoles();
478 m_CurrentFilterInput.m_SortOrder = m_SortOrder;
479 #else // PLATFORM_WINDOWS
480 m_CurrentFilterInput = m_Filters.GetFilterOptionsPC();
481 #ifdef PLATFORM_CONSOLE // PC client with -XBOX flag
483 #else
484 m_CurrentFilterInput.m_Page = 0;
485 #endif
486 #endif
487
488 m_Loading = true;
489 switch ( m_TabType )
490 {
491 case TabType.OFFICIAL:
492 {
493 m_CurrentFilterInput.SetOfficialFilter( true );
495 break;
496 }
497 case TabType.COMMUNITY:
498 {
499 m_CurrentFilterInput.SetOfficialFilter( false );
501 break;
502 }
503 case TabType.LAN:
504 {
505 m_CurrentFilterInput.SetLAN();
507 break;
508 }
509 }
510 }
511
520
521 void SelectServer(ServerBrowserEntry server)
522 {
523 #ifdef PLATFORM_CONSOLE
524 ScrollToEntry(server);
525 #endif
526
527 m_SelectedServer = server;
528
529 m_CurrentSelectedServer = m_SelectedServer.GetServerData().m_Id;
530
531 if (!m_Menu)
532 return;
533
534 m_Menu.SelectServer(server);
535 }
536
537 void OnLoadServersAsyncPC(GetServersResult result_list, EBiosError error, string response);
538
539 void OnLoadServersAsyncConsole(GetServersResult result_list, EBiosError error, string response);
540
542
543 void SetSort( ESortType type, ESortOrder order )
544 {
545 m_SortOrder = order;
546 m_SortType = type;
547 }
548
549 bool IsPingInRange( int ping, string max_ping )
550 {
551 int max = max_ping.Substring( 1, max_ping.Length() - 1 ).ToInt();
552
553 if ( ping < max )
554 return true;
555 return false;
556 }
557
559 {
560 if ( !m_Menu || m_Menu.GetServersLoadingTab() != m_TabType )
561 {
562 return false;
563 }
564
565 if ( m_Filters.m_PingFilter.IsSet() )
566 {
567 if ( !IsPingInRange( result.m_Ping, m_Filters.m_PingFilter.GetStringValue() ) )
568 {
569 return false;
570 }
571 }
572
573 return true;
574 }
575
576 // Adds extra servers to the END of the list
577 protected void LoadExtraEntries(int index);
578
579 void Connect( ServerBrowserEntry server )
580 {
581 if ( !m_Menu )
582 return;
583
584 if ( m_Menu.GetServersLoadingTab() != TabType.NONE )
585 return;
586
587 m_SelectedServer = server;
588 m_Menu.Connect( server );
589 }
590
592 {
593 switch ( m_SortType )
594 {
595 case ESortType.HOST:
596 {
597 return "name";
598 }
599 case ESortType.TIME:
600 {
601 return "name";
602 }
603 case ESortType.POPULATION:
604 {
605 return "currentNumberPlayers";
606 }
607 case ESortType.SLOTS:
608 {
609 return "freeSlots";
610 }
611 case ESortType.PING:
612 {
613 return "name";
614 }
615 }
616 return "";
617 }
618
620 {
621 return -1;
622 }
623
624 void Unfavorite(string uid)
625 {
626 ServerBrowserEntry entry;
627 if (m_EntryWidgets.Find(uid, entry))
628 {
629 entry.SetFavorite(false);
630
631 // If this is an entry in favorites tab, hide it
632 if (m_TabType == TabType.FAVORITE)
633 {
634 entry.Show(false);
635 }
636 }
637 }
638
640 {
641 return m_TabType;
642 }
643
645 {
646 w.ClearFlags( WidgetFlags.IGNOREPOINTER );
647 ColorNormal(w);
648 }
649
651 {
652 w.SetFlags( WidgetFlags.IGNOREPOINTER );
653 ColorDisable(w);
654 }
655
656 //Coloring functions (Until WidgetStyles are useful)
658 {
659 if ( w.IsInherited( ButtonWidget ) )
660 {
661 ButtonWidget button = ButtonWidget.Cast( w );
662 button.SetTextColor( ARGB( 255, 200, 0, 0 ) );
663 }
664
665 w.SetColor( ARGB( 255, 0, 0, 0) );
666
667 TextWidget text1 = TextWidget.Cast(w.FindAnyWidget( w.GetName() + "_text" ) );
668 TextWidget text2 = TextWidget.Cast(w.FindAnyWidget( w.GetName() + "_label" ) );
669 TextWidget text3 = TextWidget.Cast(w.FindAnyWidget( w.GetName() + "_text_1" ) );
670 ImageWidget image = ImageWidget.Cast( w.FindAnyWidget( w.GetName() + "_image" ) );
671 Widget option = Widget.Cast( w.FindAnyWidget( w.GetName() + "_option_wrapper" ) );
672 Widget option_label = w.FindAnyWidget( "option_label" );
673
674 if ( text1 )
675 {
676 text1.SetColor( ARGB( 255, 255, 0, 0 ) );
677 }
678
679 if ( text2 )
680 {
681 text2.SetColor( ARGB( 255, 255, 0, 0 ) );
682 }
683
684 if ( text3 )
685 {
686 text3.SetColor( ARGB( 255, 255, 0, 0 ) );
687 w.SetAlpha(1);
688 }
689
690 if ( image )
691 {
692 image.SetColor( ARGB( 255, 200, 0, 0 ) );
693 }
694
695 if ( option )
696 {
697 option.SetColor( ARGB( 255, 255, 0, 0 ) );
698 }
699
700 if ( option_label )
701 {
702 option_label.SetColor( ARGB( 255, 255, 0, 0 ) );
703 }
704 }
705
707 {
708 if ( (w.GetFlags() & WidgetFlags.IGNOREPOINTER) == WidgetFlags.IGNOREPOINTER )
709 {
710 return;
711 }
712
713 if ( w.IsInherited( ButtonWidget ) )
714 {
715 ButtonWidget button = ButtonWidget.Cast( w );
716 button.SetTextColor( ARGB( 255, 255, 255, 255 ) );
717 }
718
719 TextWidget text1 = TextWidget.Cast(w.FindAnyWidget( w.GetName() + "_text" ) );
720 TextWidget text2 = TextWidget.Cast(w.FindAnyWidget( w.GetName() + "_text_1" ) );
721 TextWidget text3 = TextWidget.Cast(w.FindAnyWidget( w.GetName() + "_label" ) );
722 ImageWidget image = ImageWidget.Cast( w.FindAnyWidget( w.GetName() + "_image" ) );
723 Widget option = w.FindAnyWidget( w.GetName() + "_option_wrapper" );
724 Widget option_label = w.FindAnyWidget( "option_label" );
725
726 if ( text1 )
727 {
728 text1.SetColor( ARGB( 255, 255, 255, 255 ) );
729 }
730
731 if ( text2 )
732 {
733 text2.SetColor( ARGB( 255, 255, 255, 255 ) );
734 }
735
736 if ( text3 )
737 {
738 text3.SetColor( ARGB( 255, 255, 255, 255 ) );
739 w.SetAlpha(0);
740 }
741
742 if ( image )
743 {
744 image.SetColor( ARGB( 255, 255, 255, 255 ) );
745 }
746
747 if ( option )
748 {
749 option.SetColor( ARGB( 150, 255, 255, 255 ) );
750 }
751
752 if ( option_label )
753 {
754 option_label.SetColor( ARGB( 255, 255, 255, 255 ) );
755 }
756 }
757
759 {
760 #ifdef PLATFORM_WINDOWS
761 SetFocus( null );
762 #endif
763
764 if ( w )
765 {
766 ButtonWidget button = ButtonWidget.Cast( w );
767 if ( button )
768 {
769 button.SetTextColor( ColorManager.COLOR_DISABLED_TEXT );
770 }
771 }
772 }
773
775 {
776 switch (m_SelectedPanel)
777 {
778 case SelectedPanel.BROWSER:
779 {
780 if (m_DetailsRoot.IsVisible())
781 {
782 SwitchToFilters(false);
783 }
784 else if (m_FilterRoot.IsVisible())
785 {
786 SwitchToDetails(false);
787 }
788 break;
789 }
790 case SelectedPanel.DETAILS:
791 {
793 break;
794 }
795 case SelectedPanel.FILTERS:
796 {
798 break;
799 }
800 }
801 }
802
803 // Here for overrides in the classes that inherit from class ServerBrowserTab
804 void SwitchToDetails(bool focus = true);
805 void SwitchToFilters(bool focus = true);
806
807 void SetServerDetails(GetServersResultRow server_info, bool online)
808 {
809 m_Details.SetDetails(server_info, online);
810 }
811
813 {
814 m_DetailsRoot.Show(true);
815 m_BtnShowDetails.Show(false);
816 m_Root.FindAnyWidget("spacer1").Show(m_TabType != TabType.FAVORITE && m_TabType != TabType.LAN);
817 m_RightAreaHeaderText.SetText("#STR_server_browser_menu_server_details");
818 }
819
821 {
822 return m_FilterRoot;
823 }
824
826 {
827 return m_DetailsRoot;
828 }
829
830 ServerBrowserEntry GetSelectedServer()
831 {
832 return m_SelectedServer;
833 }
834
835#ifdef DIAG_DEVELOPER
836 protected void InitDummyServers()
837 {
838 m_DummyServersEnabled = DiagMenu.GetBool(DiagMenuIDs.SERVER_BROWSER_DUMMY_SERVERS);
839 PluginDiagMenuClient.GetSBDummyServersInvoker().Insert(OnDummyServersEnabledChanged);
840
841 m_DummyServers = new GetServersResult();
842 m_DummyServers.m_NumServers = 100;
843
844 int serversVisibleCount = GetServersVisibleCount();
845 m_DummyServers.m_Pages = (m_DummyServers.m_NumServers + serversVisibleCount - 1) / serversVisibleCount;
846 if (m_DummyServers.m_Pages < 1)
847 {
848 m_DummyServers.m_Pages = 1;
849 }
850 m_DummyServers.m_Page = 1;
851 m_DummyServers.m_Results = new GetServersResultRowArray();
852
853 TStringArray mapNames = {"chernarusplus", "enoch", "sakhal"};
854 for (int i = 0; i < m_DummyServers.m_NumServers; ++i)
855 {
856 GetServersResultRow row = new GetServersResultRow();
857
858 string fakeIP = "127.0.0." + ((i % 250) + 1).ToString();
859 int fakePort = 2302 + (i % 10);
860 row.m_Name = string.Format("[TEST] Dummy Server %1", i + 1);
861 row.m_Id = fakeIP + ":" + fakePort.ToString();
862 #ifdef PLATFORM_CONSOLE
863 row.m_HostIp = fakeIP;
864 #endif
865 row.m_HostPort = fakePort;
866 row.m_Favorite = false;
867 row.m_Description = string.Format("Dummy server %1 description. Do not favorite me!", i + 1);
868 row.m_MapNameToRun = mapNames.GetRandomElement();
869 row.m_MaxPlayers = 60;
870 row.m_CurrentNumberPlayers = i % 60;
871 row.m_PlayersInQueue = i % 4;
872 row.m_Ping = 20 + (i % 180);
873 row.m_TimeOfDay = string.Format("%1:%2", 5 + (i % 18), i % 60);
874
875 m_DummyServers.m_Results.Insert(row);
876 }
877 }
878
879 protected void OnDummyServersEnabledChanged()
880 {
881 m_DummyServersEnabled = DiagMenu.GetBool(DiagMenuIDs.SERVER_BROWSER_DUMMY_SERVERS);
882
884 if (!m_Root || !m_Root.IsVisible())
885 return;
886 }
887
888 protected int GetServersVisibleCount()
889 {
890 return 0;
891 }
892
893 protected bool PassLocalFilters(GetServersResultRow result)
894 {
896 if (!PassFilter(result))
897 {
898 return false;
899 }
900
901 if (!m_Filters)
902 {
903 return true;
904 }
905
907 string searchName = m_Filters.GetSearchByNameFilterText();
908 if (searchName != "")
909 {
910 string serverName = result.m_Name;
911 serverName.ToLower();
912
913 if (serverName.IndexOf(searchName) == -1)
914 {
915 return false;
916 }
917 }
918
920 #ifdef PLATFORM_WINDOWS
921 string searchIP = m_Filters.GetSearchByIPFilterText();
922 if (searchIP != "")
923 {
924 string hostIp = result.m_HostIp;
925 string ipPort = result.GetIpPort();
926
927 hostIp.ToLower();
928 ipPort.ToLower();
929
930 if (hostIp.IndexOf(searchIP) == -1 && ipPort.IndexOf(searchIP) == -1)
931 {
932 return false;
933 }
934 }
935 #endif
936
938 string mapFilter = m_Filters.GetMapFilterInternalName();
939 if (mapFilter != "")
940 {
941 string serverMap = result.m_MapNameToRun;
942 serverMap.ToLower();
943
944 if (serverMap != mapFilter)
945 {
946 return false;
947 }
948 }
949
950 return true;
951 }
952#endif
953}
bool m_Initialized
EBiosError
Possible Error codes for bios API.
ESortOrder
ESortType
@ FAVORITE
array< ref GetServersResultRow > GetServersResultRowArray
static int COLOR_DISABLED_TEXT
GetServersInput the input structure of the GetServers operation.
GetServersResult the output structure of the GetServers operation.
GetServersResultRow the output structure of the GetServers operation that represents one game server.
static void LoadServers(notnull GetServersInput inputValues)
void Remove(EntityAI item)
map: item x vector(index, width, height)
Definition enwidgets.c:657
override bool IsFocusable(Widget w)
override void ColorDisable(Widget w)
override void OnFilterChanged()
override void OnFilterFocus(Widget w)
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
override void UpdateServerList()
override void SetSort(ESortType type, ESortOrder order)
override void OnLoadServersAsyncPC(GetServersResult result_list, EBiosError error, string response)
override void OnFilterFocusLost(Widget w)
override void PressSholderLeft()
override int AddSorted(GetServersResultRow entry)
override void PressSholderRight()
override void ColorNormal(Widget w)
override void SwitchToFilters(bool focus=true)
override void OnLoadServerModsAsync(string server_id, array< string > mods)
override void SwitchToDetails(bool focus=true)
override bool PassFilter(GetServersResultRow result)
override bool OnMouseEnter(Widget w, int x, int y)
override void Construct(Widget parent, ServerBrowserMenuNew menu, TabType type)
override void ColorHighlight(Widget w)
override void OnLoadServersAsyncConsole(GetServersResult result_list, EBiosError error, string response)
override void OnPressShoulder()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
EDLCId
Definition contentdlc.c:4
DiagMenuIDs
Definition ediagmenuids.c:2
proto string ToString()
DayZGame GetGame()
Definition gameplay.c:636
array< string > TStringArray
Definition enscript.c:712
@ MENU
Definition ensystem.c:343
@ NONE
body is not in simulation, nor in collision world
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.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
proto void Insert(int index, string input)
Inserts a string into the n-th index, increasing the string length by the size of the input.
proto native int IndexOf(string sample)
Finds 'sample' in 'str'.
proto int ToLower()
Changes string to lowercase.
proto native int Length()
Returns length of string.
WidgetFlags
Definition enwidgets.c:58
proto native Widget GetFocus()
proto native void SetFocus(Widget w)
Icon x
Icon y
int ARGB(int a, int r, int g, int b)
Definition proto.c:322
void LoadExtraEntries(int index)
void ServerBrowserTab(Widget parent, ServerBrowserMenuNew menu, TabType type)
ref ServerBrowserFilterContainer m_Filters
void GetPrevFilter()
ref map< ESortType, ref array< ref GetServersResultRow > > m_EntriesSorted
void OnDetailsFocusLost(Widget w)
TabType GetTabType()
TabType m_TabType
Widget m_FilterSearchText
void SelectServer(ServerBrowserEntry server)
Widget m_FiltersChanged
Widget m_SlotsSort
void GetNextPage()
TextWidget m_RightAreaHeaderText
bool m_LoadingFinished
ServerBrowserEntry m_SelectedServer
void GetNextEntry()
enum TabType BROWSER
int m_CurrentLoadedPage
void ButtonDisable(Widget w)
ref GetServersInput m_CurrentFilterInput
void SwitchRightAreaView()
void SetPanelFocus()
void ServerListFocus(bool focus, bool favorite)
ButtonWidget m_BtnPageNext
ref map< ESortType, ESortOrder > m_SortInverted
bool IsPingInRange(int ping, string max_ping)
ButtonWidget m_BtnShowFilters
ref map< string, ref ServerBrowserEntry > m_EntryWidgets
int m_TotalPages
bool GetIsServerLoadingFinished()
void ScrollToEntry(ServerBrowserEntry entry)
bool m_BegunLoading
void Connect(ServerBrowserEntry server)
enum TabType FILTERS
TabType
@ COMMUNITY
@ LAN
@ OFFICIAL
ScrollWidget m_ServerListScroller
Widget m_PingSort
int m_TotalLoadedServers
string m_CurrentSelectedServer
string GetSortOption()
Widget m_ApplyFilter
void GetPrevEntry()
ServerBrowserMenuNew m_Menu
ref map< string, ref array< string > > m_EntryMods
void Down()
bool m_Loading
SelectedPanel m_SelectedPanel
int m_LastLoadedPage
ESortType m_SortType
ServerBrowserEntry GetSelectedServer()
void GetNextFilter()
TextWidget m_LoadingText
void Up()
Widget m_PopulationSort
Widget m_MapSort
Widget m_HostSort
void Unfavorite(string uid)
ButtonWidget m_BtnPagePrev
void ButtonEnable(Widget w)
ESortOrder m_SortOrder
SpacerBaseWidget m_ServerList
int m_TotalServers
int m_CurrentPageNum
bool IsNotInitialized()
void OnDetailsFocus(Widget w)
void AddFavoritesToFilter(GetServersInput input)
void SetServerDetails(GetServersResultRow server_info, bool online)
Widget GetFilterRoot()
override bool OnFocusLost(Widget w, int x, int y)
int GetCurrentPage()
Widget m_FilterSearchTextBox
ref ServerBrowserDetailsContainer m_Details
Widget m_FilterRoot
Widget m_ResetFilters
Widget m_DetailsRoot
Widget m_RefreshList
override bool OnFocus(Widget w, int x, int y)
Widget GetDetailsRoot()
Widget m_TimeSort
Widget m_FilterContent
void ~ServerBrowserTab()
ref set< string > m_OnlineFavServers
bool IsLoadingServers()
void SetCurrentPage(int page_num)
ButtonWidget m_BtnShowDetails
void OnDLCChange(EDLCId dlcId)
ServerBrowserMenuNew GetRootMenu()
Widget m_Root
Definition sizetochild.c:91