mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
add m_quickexit option for quick exit in game menu
Default: off (false) When this option is enabled (true), then exiting the game from main menu and by menu_quit command doesn't require confirmation and doesn't play sound.
This commit is contained in:
parent
0c2ed71cdd
commit
ff9715c080
2 changed files with 12 additions and 1 deletions
|
@ -46,6 +46,8 @@
|
|||
EXTERN_CVAR (Bool, saveloadconfirmation) // [mxd]
|
||||
EXTERN_CVAR (Bool, quicksaverotation)
|
||||
|
||||
CVAR(Bool, m_quickexit, false, CVAR_ARCHIVE)
|
||||
|
||||
typedef void(*hfunc)();
|
||||
DEFINE_ACTION_FUNCTION(DMessageBoxMenu, CallHandler)
|
||||
{
|
||||
|
@ -85,9 +87,14 @@ DMenu *CreateMessageBoxMenu(DMenu *parent, const char *message, int messagemode,
|
|||
|
||||
CCMD (menu_quit)
|
||||
{ // F10
|
||||
if (m_quickexit)
|
||||
{
|
||||
ST_Endoom();
|
||||
}
|
||||
|
||||
M_StartControlPanel (true);
|
||||
|
||||
int messageindex = gametic % gameinfo.quitmessages.Size();
|
||||
const size_t messageindex = static_cast<size_t>(gametic) % gameinfo.quitmessages.Size();
|
||||
FString EndString;
|
||||
const char *msg = gameinfo.quitmessages[messageindex];
|
||||
if (msg[0] == '$')
|
||||
|
|
|
@ -1202,6 +1202,10 @@ OptionMenu "MiscOptions" protected
|
|||
SafeCommand "$MISCMNU_CLEARNODECACHE", "clearnodecache"
|
||||
StaticText " "
|
||||
Option "$OPTMNU_LANGUAGE", "language", "LanguageOptions"
|
||||
|
||||
StaticText " "
|
||||
Option "$MISCMNU_QUICKEXIT", "m_quickexit", "OnOff"
|
||||
|
||||
IfOption(Windows)
|
||||
{
|
||||
StaticText " "
|
||||
|
|
Loading…
Reference in a new issue