]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/serverlist.qh
Restore white tos text
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / serverlist.qh
index e45abfda33b528cce9e9e72035dd4ab1807d47c5..150e220715c21a4b776178947056543df0559527 100644 (file)
@@ -30,13 +30,14 @@ CLASS(XonoticServerList, XonoticListBox)
        ATTRIB(XonoticServerList, columnTypeSize, float, 0);
        ATTRIB(XonoticServerList, columnPlayersOrigin, float, 0);
        ATTRIB(XonoticServerList, columnPlayersSize, float, 0);
-       ATTRIB(XonoticServerList, lockedSelectedItem, bool, true);      // initially keep selected the first item of the list, avoiding an unwanted scrolling
+       ATTRIB(XonoticServerList, lockedSelectedItem, bool, true); // initially keep selected the first item of the list to avoid unwanted scrolling
 
        ATTRIB(XonoticServerList, selectedServer, string); // to restore selected server when needed
        METHOD(XonoticServerList, setSelected, void(entity, float));
        METHOD(XonoticServerList, setSortOrder, void(entity, float, float));
        ATTRIB(XonoticServerList, filterShowEmpty, float, 1);
        ATTRIB(XonoticServerList, filterShowFull, float, 1);
+       ATTRIB(XonoticServerList, filterShowLaggy, float, 0);
        ATTRIB(XonoticServerList, filterString, string);
        ATTRIB(XonoticServerList, controlledTextbox, entity);
        ATTRIB(XonoticServerList, ipAddressBox, entity);
@@ -52,6 +53,7 @@ CLASS(XonoticServerList, XonoticListBox)
        ATTRIB(XonoticServerList, sortButton4, entity);
        ATTRIB(XonoticServerList, sortButton5, entity);
        ATTRIB(XonoticServerList, connectButton, entity);
+       //ATTRIB(XonoticServerList, disconnectButton, entity);
        ATTRIB(XonoticServerList, infoButton, entity);
        ATTRIB(XonoticServerList, currentSortOrder, float, 0);
        ATTRIB(XonoticServerList, currentSortField, float, -1);
@@ -61,6 +63,7 @@ CLASS(XonoticServerList, XonoticListBox)
        ATTRIB(XonoticServerList, seenIPv4, float, 0);
        ATTRIB(XonoticServerList, seenIPv6, float, 0);
        ATTRIB(XonoticServerList, categoriesHeight, float, 1.25);
+       ATTRIB(XonoticServerList, serversHeight, float, 1.0);
 
        METHOD(XonoticServerList, getTotalHeight, float(entity));
        METHOD(XonoticServerList, getItemAtPos, float(entity, float));
@@ -70,11 +73,12 @@ ENDCLASS(XonoticServerList)
 entity makeXonoticServerList();
 
 void RegisterSLCategories();
-float CheckCategoryForEntry(float entry);
+float CategoryForEntry(float entry);
 void ServerList_Filter_Change(entity box, entity me);
 void ServerList_Categories_Click(entity box, entity me);
 void ServerList_ShowEmpty_Click(entity box, entity me);
 void ServerList_ShowFull_Click(entity box, entity me);
+void ServerList_ShowLaggy_Click(entity box, entity me);
 void ServerList_Connect_Click(entity btn, entity me);
 void ServerList_Update_favoriteButton(entity btn, entity me);
 void ServerList_Favorite_Click(entity btn, entity me);
@@ -107,6 +111,7 @@ float autocvar_menu_slist_categories;
 float autocvar_menu_slist_categories_onlyifmultiple;
 float autocvar_menu_slist_purethreshold;
 float autocvar_menu_slist_modimpurity;
+float autocvar_menu_slist_maxping = 300;
 float autocvar_menu_slist_recommendations;
 float autocvar_menu_slist_recommendations_maxping;
 float autocvar_menu_slist_recommendations_minfreeslots;
@@ -120,14 +125,11 @@ const float REFRESHSERVERLIST_RESET = 3;     // ..., also clear the list first
 
 // function declarations
 float IsServerInList(string list, string srv);
-#define IsFavorite(srv) IsServerInList(cvar_string("net_slist_favorites"), srv)
-#define IsPromoted(srv) IsServerInList(_Nex_ExtResponseSystem_PromotedServers, srv)
-#define IsRecommended(srv) IsServerInList(_Nex_ExtResponseSystem_RecommendedServers, srv)
 
 entity RetrieveCategoryEnt(float catnum);
 
-float CheckCategoryOverride(float cat);
-float m_gethostcachecategory(float entry) { return CheckCategoryOverride(CheckCategoryForEntry(entry)); }
+float CategoryOverride(float cat);
+float m_gethostcachecategory(float entry);
 
 
 // fields for category entities