]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/cvarlist.qc
Merge branch 'terencehill/menu_fixes' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / cvarlist.qc
index e41223277f77f8790c1b9fcd33041cf04af6b749..12bb2810ba87282e54d9df9c43b7df5e1dba38c1 100644 (file)
@@ -1,7 +1,9 @@
 #include "cvarlist.qh"
 
 #include "inputbox.qh"
+#include "../item/checkbox.qh"
 #include "../item/container.qh"
+#include "../item/checkbox.qh"
 
 entity makeXonoticCvarList()
 {
@@ -46,9 +48,17 @@ void XonoticCvarList_showNotify(entity me)
        if(force_initial_selection)
                me.setSelected(me, 0);
 }
+void XonoticCvarList_hideNotify(entity me)
+{
+       if(me.handle)
+               buf_del(me.handle);
+       me.handle = buf_create();
+       me.nItems = 0;
+}
 void XonoticCvarList_destroy(entity me)
 {
-       buf_del(me.handle);
+       if(me.handle)
+               buf_del(me.handle);
 }
 string autocvar_menu_forced_saved_cvars;
 string autocvar_menu_reverted_nonsaved_cvars;