]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix server icons of the first entries of each group being smaller than others if...
authorterencehill <piuntn@gmail.com>
Thu, 22 Dec 2022 23:20:34 +0000 (00:20 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 22 Dec 2022 23:20:34 +0000 (00:20 +0100)
qcsrc/menu/xonotic/serverlist.qc

index ec183dad4edee43602bfb34c6eea17ddb2aef693..47cc367918059afb95c6d7bdaa7597db4a35c861 100644 (file)
@@ -814,8 +814,8 @@ void XonoticServerList_drawListBoxItem(entity me, int i, vector absSize, bool is
                if(catent)
                {
                        SET_YRANGE(
-                               (me.categoriesHeight - 1) / (me.categoriesHeight + 1),
-                               me.categoriesHeight / (me.categoriesHeight + 1)
+                               (me.categoriesHeight - me.realFontSize.y) / (me.categoriesHeight + me.serversHeight),
+                               me.categoriesHeight / (me.categoriesHeight + me.serversHeight)
                        );
                        draw_Text(
                                eY * me.realUpperMargin
@@ -832,7 +832,7 @@ void XonoticServerList_drawListBoxItem(entity me, int i, vector absSize, bool is
                                SKINALPHA_SERVERLIST_CATEGORY,
                                0
                        );
-                       SET_YRANGE(me.categoriesHeight / (me.categoriesHeight + 1), 1);
+                       SET_YRANGE(me.categoriesHeight / (me.categoriesHeight + me.serversHeight), 1);
                }
        }
 
@@ -1193,7 +1193,6 @@ float XonoticServerList_getItemHeight(entity me, int item)
 {
        for (int i = 0; i < category_draw_count; ++i) {
                // Matches exactly the headings with increased height.
-               // FIXME server row next to the heading is slightly smaller than others if (autocvar_menu_slist_categories <= 0)
                if (item == category_item[i])
                        return me.itemHeight * (me.categoriesHeight + me.serversHeight);
        }