]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Game menu dialog: jump to other menu dialogs by using the new directmenu behaviour 1483/head
authorterencehill <piuntn@gmail.com>
Fri, 28 Feb 2025 18:49:22 +0000 (19:49 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 28 Feb 2025 18:49:22 +0000 (19:49 +0100)
that hides the menu when closing these dialogs

Also remove an unused tab attribute

qcsrc/menu/item/dialog.qh
qcsrc/menu/item/tab.qh
qcsrc/menu/xonotic/dialog_gamemenu.qc

index 34ea86084f755b222d5b5b059feb687aa9e8d483..6e781bac372ae411009d341db54861e50c8f6974 100644 (file)
@@ -4,7 +4,6 @@
 // - isTabRoot is 0
 // - backgroundImage is the tab's background
 // - closable is 0
-// - rootDialog is 0
 // - title is ""
 // - marginTop is
 // - intendedHeight ends up to be the tab's actual height, or at least close
index 18c9e495979f1ae24a5b2a495bf575c4571006eb..c51447826be2011af8d55bb72d7a18cfadbdac70 100644 (file)
@@ -4,7 +4,6 @@
 CLASS(Tab, Dialog)
        ATTRIB(Tab, isTabRoot, float, 0);
        ATTRIB(Tab, closable, float, 0);
-       ATTRIB(Tab, rootDialog, float, 0);
        ATTRIB(Tab, title, string);
        ATTRIB(Tab, titleFontSize, float, 0);  // pixels
 
index a9ba16b4f0ff885f62e1b8773c893964576b2988..ac8c6c6c9f0af970eca6689fe6a1c2510b721c05 100644 (file)
@@ -40,18 +40,19 @@ void XonoticGameMenuDialog_fill(entity me)
        entity e;
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Main menu"), '0 0 0', "menu_cmd nexposee", 0));
+               // NOTE these buttons use directmenu so that the menu will be hidden when these dialogs are closed
        me.TR(me);
                me.TDempty(me, 0.1);
-               me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Servers"), '0 0 0', "menu_cmd servers", 0));
+               me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Servers"), '0 0 0', "menu_cmd directmenu servers", 0));
        me.TR(me);
                me.TDempty(me, 0.1);
-               me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Profile"), '0 0 0', "menu_cmd profile", 0));
+               me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Profile"), '0 0 0', "menu_cmd directmenu profile", 0));
        me.TR(me);
                me.TDempty(me, 0.1);
-               me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Settings"), '0 0 0', "menu_cmd settings", 0));
+               me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Settings"), '0 0 0', "menu_cmd directmenu settings", 0));
        me.TR(me);
                me.TDempty(me, 0.1);
-               me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Input"), '0 0 0', "menu_cmd inputsettings", 0));
+               me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Input"), '0 0 0', "menu_cmd directmenu inputsettings", 0));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Quick menu"), '0 0 0', "quickmenu", COMMANDBUTTON_CLOSE));
        me.TR(me);