From: terencehill Date: Fri, 28 Feb 2025 18:49:22 +0000 (+0100) Subject: Game menu dialog: jump to other menu dialogs by using the new directmenu behaviour X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F1483%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Game menu dialog: jump to other menu dialogs by using the new directmenu behaviour that hides the menu when closing these dialogs Also remove an unused tab attribute --- diff --git a/qcsrc/menu/item/dialog.qh b/qcsrc/menu/item/dialog.qh index 34ea86084f..6e781bac37 100644 --- a/qcsrc/menu/item/dialog.qh +++ b/qcsrc/menu/item/dialog.qh @@ -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 diff --git a/qcsrc/menu/item/tab.qh b/qcsrc/menu/item/tab.qh index 18c9e49597..c51447826b 100644 --- a/qcsrc/menu/item/tab.qh +++ b/qcsrc/menu/item/tab.qh @@ -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 diff --git a/qcsrc/menu/xonotic/dialog_gamemenu.qc b/qcsrc/menu/xonotic/dialog_gamemenu.qc index a9ba16b4f0..ac8c6c6c9f 100644 --- a/qcsrc/menu/xonotic/dialog_gamemenu.qc +++ b/qcsrc/menu/xonotic/dialog_gamemenu.qc @@ -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);