From 20911d8dc2cf988a8b7fae889f07089bda575696 Mon Sep 17 00:00:00 2001 From: driAn Date: Sat, 11 Oct 2008 12:07:50 +0000 Subject: [PATCH] option to enable/disable quit dialog git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2932 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/defaults.cfg | 2 ++ config/menus.cfg | 8 +++++++- config/menus_settings.cfg | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/config/defaults.cfg b/config/defaults.cfg index bbb5de30..f7e94543 100644 --- a/config/defaults.cfg +++ b/config/defaults.cfg @@ -114,3 +114,5 @@ alias delta_spect_0 [ followplayer $arg1 ] alias toggleshowmap [ showmap 1; onrelease [ showmap 0 ] ] alias mapstartonce [ ] + +alias askquit 1 diff --git a/config/menus.cfg b/config/menus.cfg index bd6cba7b..586b64ab 100755 --- a/config/menus.cfg +++ b/config/menus.cfg @@ -9,7 +9,7 @@ menuitem "Demo" "showmenu demo" menuitem "Editing" "showmenu editing" menuitem "Help" "showmenu help" menuitem "About" "showmenu about" -menuitem "Quit" "showmenu quit" +menuitem "Quit" "savequit" // Start maps. @@ -149,10 +149,16 @@ menuitem "" "" menuitem "Also thanks to kurtis84, player1, quase, exis, talou and others for testing." "" menuitem "Thanks to flowtron and exis for organising the 0.93 AssaultCube Release Cup." "" + +// show quit dialog if enabled + newmenu quit menuitem "Yes, quit now" "quit" menuitem "No" " " +alias savequit [ + if (= $askquit 1) [ showmenu quit ] [ quit ] +] // create additional menus diff --git a/config/menus_settings.cfg b/config/menus_settings.cfg index 32802c95..afba7bd1 100644 --- a/config/menus_settings.cfg +++ b/config/menus_settings.cfg @@ -323,6 +323,7 @@ newmenu game menuitemcheckbox "Auto weapon reload: " "$autoreload" "autoreload $arg1" menuitemcheckbox "Show modes as acronyms: " "$modeacronyms" "modeacronyms $arg1" menuitemcheckbox "Auto map download: " "$autogetmap" "autogetmap $arg1" +menuitemcheckbox "Show quit dialog when quitting: " "$askquit" "askquit = $arg1" menuitemcheckbox "OMG!Ponies! mode: " "(getponiesmode)" "new_poniesmode $arg1" menuitemslider "Player skins: " 0 2 "$teamdisplaymode" 1 [normal "colored vests" "full color"] "teamdisplaymode $arg1"