]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Properly show / hide Race and CTS from the game type list when toggling developer...
authorterencehill <piuntn@gmail.com>
Mon, 25 Jul 2016 17:22:50 +0000 (19:22 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 25 Jul 2016 17:22:50 +0000 (19:22 +0200)
qcsrc/menu/xonotic/gametypelist.qc
qcsrc/menu/xonotic/gametypelist.qh

index 9ee031dc783e6196dca7df6592ba6ab5f63fb6ea..193f8336838acb793ed261da5566bd9cb2bddf8c 100644 (file)
@@ -59,6 +59,15 @@ void XonoticGametypeList_saveCvars(entity me)
                owner.gameTypeChangeNotify(owner);
        }
 }
+void XonoticGametypeList_draw(entity me)
+{
+       if(me.nItems != GameType_GetCount())
+       {
+               me.nItems = GameType_GetCount();
+               me.setSelected(me, 0);
+       }
+       SUPER(XonoticGametypeList).draw(me);
+}
 void XonoticGametypeList_drawListBoxItem(entity me, int i, vector absSize, bool isSelected, bool isFocused)
 {
        string s1, s2;
index 95eceaa09b350abaa6c337986d5e37c41dd1631c..9e17c5c85523e5008d275f80687688951cf19448 100644 (file)
@@ -4,6 +4,7 @@
 CLASS(XonoticGametypeList, XonoticListBox)
        METHOD(XonoticGametypeList, configureXonoticGametypeList, void(entity));
        ATTRIB(XonoticGametypeList, rowsPerItem, float, 2)
+       METHOD(XonoticGametypeList, draw, void(entity));
        METHOD(XonoticGametypeList, drawListBoxItem, void(entity, int, vector, bool, bool));
        METHOD(XonoticGametypeList, resizeNotify, void(entity, vector, vector, vector, vector));
        METHOD(XonoticGametypeList, setSelected, void(entity, float));