]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Create cvar list when it is displayed rather then on menu start
authorterencehill <piuntn@gmail.com>
Wed, 2 Dec 2015 23:53:14 +0000 (00:53 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 2 Dec 2015 23:53:14 +0000 (00:53 +0100)
qcsrc/menu/xonotic/cvarlist.qc
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc
qcsrc/menu/xonotic/dialog_settings_misc_cvars.qc
qcsrc/menu/xonotic/dialog_teamselect.qc

index 8323221daf8fe7c948290f6a749ebadc409cb1ba..a286d08b1cc375ead60267d089058d68b02af52a 100644 (file)
@@ -7,6 +7,7 @@ CLASS(XonoticCvarList, XonoticListBox)
        METHOD(XonoticCvarList, drawListBoxItem, void(entity, int, vector, bool, bool));
        METHOD(XonoticCvarList, resizeNotify, void(entity, vector, vector, vector, vector));
        METHOD(XonoticCvarList, keyDown, float(entity, float, float, float));
+       METHOD(XonoticCvarList, showNotify, void(entity));
 
        METHOD(XonoticCvarList, destroy, void(entity));
 
@@ -53,8 +54,10 @@ entity makeXonoticCvarList()
 void XonoticCvarList_configureXonoticCvarList(entity me)
 {
        me.configureXonoticListBox(me);
-
        me.handle = buf_create();
+}
+void XonoticCvarList_showNotify(entity me)
+{
        buf_cvarlist(me.handle, "", "_");
        me.nItems = buf_getsize(me.handle);
 }
index 2f3cd47b02e592696c1daf4e6974b83220b19b62..eff3723bd46e6315bb6a5d0495776cff77a06312 100644 (file)
@@ -20,6 +20,7 @@ ENDCLASS(XonoticMutatorsDialog)
 #ifdef IMPLEMENTATION
 void XonoticMutatorsDialog_showNotify(entity me)
 {
+       SUPER(XonoticMutatorsDialog).showNotify(me);
        loadAllCvars(me);
 }
 
index 6ace10c1241b9cef599e3f49050f12546c84b729..8a2d489a0b9717dddd1f5f5570017c9958d1fed9 100644 (file)
@@ -15,6 +15,7 @@ ENDCLASS(XonoticCvarsDialog)
 #ifdef IMPLEMENTATION
 void XonoticCvarsDialog_showNotify(entity me)
 {
+       SUPER(XonoticCvarsDialog).showNotify(me);
        loadAllCvars(me);
 }
 void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIST_CONTROLS to color ALL controls
index 3b624e2ad0bda58ed7e1c39a053569fd02d06327..9185a1f6ea15f825caeed300e5f0e0bb63238cca 100644 (file)
@@ -32,6 +32,7 @@ entity makeTeamButton(string theName, vector theColor, string commandtheName)
 
 void XonoticTeamSelectDialog_showNotify(entity me)
 {
+       SUPER(XonoticTeamSelectDialog).showNotify(me);
        float teams, nTeams;
        teams = cvar("_teams_available");
        nTeams = 0;