From 346c2a797b81be5c4dbefbf059c26790bccdafcd Mon Sep 17 00:00:00 2001 From: Sahil Singhal Date: Wed, 9 Jun 2010 19:39:01 -0400 Subject: [PATCH] Add exit dialog. Not done yet though. --- defaultXonotic.cfg | 1 + qcsrc/client/hud.qc | 4 +++- qcsrc/menu/classes.c | 1 + qcsrc/menu/xonotic/mainwindow.c | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 025efa3b6..0294ddd63 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1693,6 +1693,7 @@ exec turrets.cfg // must be at the bottom of this file: // alias for switching the teamselect menu alias menu_showteamselect "menu_cmd directmenu TeamSelect" +alias menu_showhudexit "menu_cmd directmenu HUDExit" alias menu_sync "menu_cmd sync" bind f5 menu_showteamselect diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 1f592d194..1cbed1294 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1179,7 +1179,9 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary) } } else if(nPrimary == K_ESCAPE) - cvar_set("_hud_configure", "0"); + { + localcmd("menu_showhudexit\n"); + } return true; // Suppress ALL other input } diff --git a/qcsrc/menu/classes.c b/qcsrc/menu/classes.c index 4800fac8d..b03c7ebcc 100644 --- a/qcsrc/menu/classes.c +++ b/qcsrc/menu/classes.c @@ -83,3 +83,4 @@ #include "xonotic/colorpicker.c" #include "xonotic/cvarlist.c" #include "xonotic/dialog_settings_misc_cvars.c" +#include "xonotic/dialog_hudsetup_exit.c" diff --git a/qcsrc/menu/xonotic/mainwindow.c b/qcsrc/menu/xonotic/mainwindow.c index 460bfd676..5a4168f54 100644 --- a/qcsrc/menu/xonotic/mainwindow.c +++ b/qcsrc/menu/xonotic/mainwindow.c @@ -32,6 +32,10 @@ void configureMainWindowMainWindow(entity me) i = spawnXonoticTeamSelectDialog(); i.configureDialog(i); me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + + i = spawnXonoticHUDExitDialog(); + i.configureDialog(i); + me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); me.advancedDialog = i = spawnXonoticAdvancedDialog(); i.configureDialog(i); -- 2.39.2