diff options
author | Simon Howard | 2011-10-20 23:19:32 +0000 |
---|---|---|
committer | Simon Howard | 2011-10-20 23:19:32 +0000 |
commit | 15f1bce94eec21fe9e11ee7e6745d01ccd4cfa70 (patch) | |
tree | 0eed440b0593e2d2ba9d4e35889d54bb1fafad75 /src/strife | |
parent | 112bc3fcab6654c20bc980a04d377b5b03044067 (diff) | |
download | chocolate-doom-15f1bce94eec21fe9e11ee7e6745d01ccd4cfa70.tar.gz chocolate-doom-15f1bce94eec21fe9e11ee7e6745d01ccd4cfa70.tar.bz2 chocolate-doom-15f1bce94eec21fe9e11ee7e6745d01ccd4cfa70.zip |
Confirm quit game when the window close button is clicked a second time.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2449
Diffstat (limited to 'src/strife')
-rw-r--r-- | src/strife/m_menu.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c index 1593bdf2..2fa63abc 100644 --- a/src/strife/m_menu.c +++ b/src/strife/m_menu.c @@ -1686,8 +1686,19 @@ boolean M_Responder (event_t* ev) // "close" button pressed on window? if (ev->type == ev_quit) { - S_StartSound(NULL, sfx_swtchn); - M_QuitStrife(0); + // First click on close button = bring up quit confirm message. + // Second click on close button = confirm quit + + if (menuactive && messageToPrint && messageRoutine == M_QuitResponse) + { + M_QuitResponse(key_menu_confirm); + } + else + { + S_StartSound(NULL, sfx_swtchn); + M_QuitStrife(0); + } + return true; } |