From 9ea7a8ebab194905dbfa01309bada1daf72a9ae6 Mon Sep 17 00:00:00 2001 From: Sahil Singhal Date: Wed, 9 Jun 2010 19:55:30 -0400 Subject: [PATCH] Toggle menu off when already connected when pressing hud setup. --- qcsrc/menu/xonotic/dialog_hudsetup_exit.c | 2 +- .../xonotic/dialog_multiplayer_playersetup.c | 36 ++----------------- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/qcsrc/menu/xonotic/dialog_hudsetup_exit.c b/qcsrc/menu/xonotic/dialog_hudsetup_exit.c index 968596c7e..f5af5e21c 100644 --- a/qcsrc/menu/xonotic/dialog_hudsetup_exit.c +++ b/qcsrc/menu/xonotic/dialog_hudsetup_exit.c @@ -16,6 +16,6 @@ void fillXonoticHUDExitDialog(entity me) { entity e; me.TR(me); - me.TD(me, 2, 1, makeXonoticCommandButton("Exit Setup", '1 0.5 0.5', "_hud_configure 0", 1)); + me.TD(me, 2, 1, makeXonoticCommandButton("Exit Setup", '1 1 1', "_hud_configure 0", 1)); } #endif diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c index 2cfb27262..9fce67b5e 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c @@ -189,41 +189,9 @@ void HUDSetup_Join_Click(entity me, entity btn) if(! (gamestatus & (GAME_CONNECTED | GAME_ISSERVER))) { localcmd("map hudsetup", "\n"); - /*float glob, i, n, fh; - string s; - glob = search_begin("maps/*.instantaction", TRUE, TRUE); - if(glob < 0) - return; - i = ceil(random() * search_getsize(glob)) - 1; - fh = fopen(search_getfilename(glob, i), FILE_READ); - search_end(glob); - if(fh < 0) - return; - while((s = fgets(fh))) - { - if(substring(s, 0, 4) == "set ") - s = substring(s, 4, strlen(s) - 4); - n = tokenize_console(s); - if(argv(0) == "bot_number") - cvar_set("bot_number", argv(1)); - else if(argv(0) == "skill") - cvar_set("skill", argv(1)); - else if(argv(0) == "timelimit") - cvar_set("timelimit_override", argv(1)); - else if(argv(0) == "fraglimit") - cvar_set("fraglimit_override", argv(1)); - else if(argv(0) == "changelevel") - { - fclose(fh); - localcmd("\nmenu_loadmap_prepare\n"); - MapInfo_SwitchGameType(MAPINFO_TYPE_DEATHMATCH); - MapInfo_LoadMap(argv(1)); - cvar_set("lastlevel", "1"); - return; - } - } - fclose(fh);*/ } + else + localcmd("togglemenu\n"); localcmd("_hud_configure 1", "\n"); } #endif -- 2.39.2