From: terencehill Date: Thu, 28 Jul 2022 09:01:34 +0000 (+0200) Subject: Fix #2727 "New esc-menu shouldn't open a standard settings page" X-Git-Tag: xonotic-v0.8.6~401 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d99f5ca57c15cb2fa4735a1658a6e33fa0834017;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2727 "New esc-menu shouldn't open a standard settings page" --- diff --git a/qcsrc/menu/command/menu_cmd.qc b/qcsrc/menu/command/menu_cmd.qc index 2f97712b6..2003a7eeb 100644 --- a/qcsrc/menu/command/menu_cmd.qc +++ b/qcsrc/menu/command/menu_cmd.qc @@ -152,6 +152,12 @@ void GameCommand(string theCommand) return; } + if (argv(0) == "settings") + { + m_goto("settings"); + return; + } + if (argv(0) == "inputsettings") { m_goto("inputsettings"); diff --git a/qcsrc/menu/xonotic/dialog_gamemenu.qc b/qcsrc/menu/xonotic/dialog_gamemenu.qc index 68d612de3..a9ba16b4f 100644 --- a/qcsrc/menu/xonotic/dialog_gamemenu.qc +++ b/qcsrc/menu/xonotic/dialog_gamemenu.qc @@ -48,7 +48,7 @@ void XonoticGameMenuDialog_fill(entity me) me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Profile"), '0 0 0', "menu_cmd profile", 0)); me.TR(me); me.TDempty(me, 0.1); - me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Settings"), '0 0 0', "menu_cmd videosettings", 0)); + me.TD(me, 1, 0.8, e = makeXonoticCommandButton(_("Settings"), '0 0 0', "menu_cmd 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)); diff --git a/qcsrc/menu/xonotic/dialog_settings.qh b/qcsrc/menu/xonotic/dialog_settings.qh index 3564a02e8..984957095 100644 --- a/qcsrc/menu/xonotic/dialog_settings.qh +++ b/qcsrc/menu/xonotic/dialog_settings.qh @@ -4,6 +4,7 @@ CLASS(XonoticSettingsDialog, XonoticDialog) METHOD(XonoticSettingsDialog, fill, void(entity)); ATTRIB(XonoticSettingsDialog, title, string, _("Settings")); + ATTRIB(XonoticSettingsDialog, name, string, "settings"); ATTRIB(XonoticSettingsDialog, tooltip, string, _("Change the game settings")); ATTRIB(XonoticSettingsDialog, color, vector, SKINCOLOR_DIALOG_SETTINGS); ATTRIB(XonoticSettingsDialog, intendedWidth, float, 0.96);