From 31ea4f89ce56a130dff1ed72fe4a4d438c9e0e4b Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 9 Feb 2012 15:47:31 +0100 Subject: [PATCH] remove lots of uses of togglemenu --- qcsrc/menu/menu.qc | 4 +++- qcsrc/menu/xonotic/dialog_firstrun.c | 4 ++-- qcsrc/menu/xonotic/dialog_settings_video.c | 2 +- qcsrc/menu/xonotic/languagelist.c | 2 +- qcsrc/menu/xonotic/skinlist.c | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index c46069a3c..45f3f14b6 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -34,7 +34,7 @@ void m_init() { prvm_language = "en"; cvar_set("prvm_language", prvm_language); - localcmd("\nmenu_restart; togglemenu\n"); + localcmd("\nmenu_restart\n"); } prvm_language = strzone(prvm_language); cvar_set("_menu_prvm_language", prvm_language); @@ -69,6 +69,8 @@ void m_init() if(ddsload != cvar("r_texture_dds_load") || texcomp != cvar("gl_texturecompression")) localcmd("\nr_restart\n"); initConwidths(); + + m_display(); } float MENU_ASPECT = 1.25; // 1280x1024 diff --git a/qcsrc/menu/xonotic/dialog_firstrun.c b/qcsrc/menu/xonotic/dialog_firstrun.c index d52c4c7b4..39a7d2c70 100644 --- a/qcsrc/menu/xonotic/dialog_firstrun.c +++ b/qcsrc/menu/xonotic/dialog_firstrun.c @@ -69,7 +69,7 @@ void XonoticFirstRunDialog_fill(entity me) me.TR(me); me.TD(me, 6, 2, e = makeXonoticLanguageList()); e.name = "languageselector_firstrun"; - e.doubleClickCommand = "prvm_language \"$_menu_prvm_language\"; saveconfig; menu_restart; togglemenu"; + e.doubleClickCommand = "prvm_language \"$_menu_prvm_language\"; saveconfig; menu_restart"; me.TR(me); me.TR(me); @@ -84,7 +84,7 @@ void XonoticFirstRunDialog_fill(entity me) // because of the language selector, this is a menu_restart! me.gotoRC(me, me.rows - 1, 0); - me.TD(me, 1, me.columns, e = makeXonoticCommandButton(_("Save settings"), '0 0 0', "prvm_language \"$_menu_prvm_language\"; saveconfig; menu_restart; togglemenu", COMMANDBUTTON_APPLY)); + me.TD(me, 1, me.columns, e = makeXonoticCommandButton(_("Save settings"), '0 0 0', "prvm_language \"$_menu_prvm_language\"; saveconfig; menu_restart", COMMANDBUTTON_APPLY)); setDependentWeird(e, CheckFirstRunButton); } #endif diff --git a/qcsrc/menu/xonotic/dialog_settings_video.c b/qcsrc/menu/xonotic/dialog_settings_video.c index 81b89f7af..c0fddcc5b 100644 --- a/qcsrc/menu/xonotic/dialog_settings_video.c +++ b/qcsrc/menu/xonotic/dialog_settings_video.c @@ -140,6 +140,6 @@ void XonoticVideoSettingsTab_fill(entity me) } me.gotoRC(me, me.rows - 1, 0); - me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "menu_cmd sync; vid_restart; menu_restart; togglemenu; defer 0.1 \"menu_cmd videosettings\"", COMMANDBUTTON_APPLY)); + me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "menu_cmd sync; vid_restart; menu_restart; defer 0.1 \"menu_cmd videosettings\"", COMMANDBUTTON_APPLY)); } #endif diff --git a/qcsrc/menu/xonotic/languagelist.c b/qcsrc/menu/xonotic/languagelist.c index c4b2122b6..9b9a148cc 100644 --- a/qcsrc/menu/xonotic/languagelist.c +++ b/qcsrc/menu/xonotic/languagelist.c @@ -27,7 +27,7 @@ CLASS(XonoticLanguageList) EXTENDS(XonoticListBox) ATTRIB(XonoticLanguageList, name, string, "languageselector") // change this to make it noninteractive (for first run dialog) - ATTRIB(XonoticLanguageList, doubleClickCommand, string, "prvm_language \"$_menu_prvm_language\"\nmenu_restart\ntogglemenu\ndefer 0.1 \"menu_cmd languageselect\"") + ATTRIB(XonoticLanguageList, doubleClickCommand, string, "prvm_language \"$_menu_prvm_language\"\nmenu_restart\ndefer 0.1 \"menu_cmd languageselect\"") ENDCLASS(XonoticLanguageList) entity makeXonoticLanguageList(); diff --git a/qcsrc/menu/xonotic/skinlist.c b/qcsrc/menu/xonotic/skinlist.c index 68314cd02..b636336b1 100644 --- a/qcsrc/menu/xonotic/skinlist.c +++ b/qcsrc/menu/xonotic/skinlist.c @@ -175,7 +175,7 @@ void XonoticSkinList_drawListBoxItem(entity me, float i, vector absSize, float i void XonoticSkinList_setSkin(entity me) { me.saveCvars(me); - localcmd("\nmenu_restart\ntogglemenu\ndefer 0.1 \"menu_cmd skinselect\"\n"); + localcmd("\nmenu_restart\ndefer 0.1 \"menu_cmd skinselect\"\n"); } void SetSkin_Click(entity btn, entity me) -- 2.39.2