]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/serverlist.qc
#includes: cleanup menu
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / serverlist.qc
index 8aa5c105e895d097c955f787bb844b0349460848..e2c6472092fe53d19068e426b1adbcff9a0f279a 100644 (file)
@@ -231,7 +231,7 @@ entity RetrieveCategoryEnt(int catnum)
        else
        {
                error(sprintf("RetrieveCategoryEnt(%d): Improper category number!\n", catnum));
-               return world;
+               return NULL;
        }
 }
 
@@ -433,11 +433,17 @@ void XonoticServerList_toggleFavorite(entity me, string srv)
 
 void ServerList_Update_favoriteButton(entity btn, entity me)
 {
-       me.favoriteButton.setText(me.favoriteButton,
-               (IsFavorite(me.ipAddressBox.text) ?
-                       _("Remove") : _("Favorite")
-               )
-       );
+       entity e = me.favoriteButton;
+       if(IsFavorite(me.ipAddressBox.text))
+       {
+               e.setText(e, _("Remove"));
+               clearTooltip(e);
+       }
+       else
+       {
+               e.setText(e, _("Favorite"));
+               setZonedTooltip(e, _("Bookmark the currently highlighted server so that it's faster to find in the future"), string_null);
+       }
 }
 
 entity makeXonoticServerList()