Patch #715991: Quit Confirmation Dialog (feature request #642721) with some tweaks by me

svn-id: r9210
This commit is contained in:
Max Horn 2003-07-28 01:36:16 +00:00
parent e87bc6d89e
commit d592095fb9
6 changed files with 50 additions and 1 deletions

View file

@ -681,6 +681,21 @@ PauseDialog::PauseDialog(NewGui *gui, Scumm *scumm)
: InfoDialog(gui, scumm, 10) {
}
ConfirmExitDialog::ConfirmExitDialog(NewGui *gui, Scumm *scumm)
: InfoDialog(gui, scumm, "Do you really want to quit (y/n)?") {
}
void ConfirmExitDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) {
if (tolower(ascii) == 'n') { // Close exit dialog if n key is pressed
setResult(0);
close();
} else if (tolower(ascii) == 'y') { // Quit if y key is pressed
setResult(1);
close();
} else
ScummDialog::handleKeyDown(ascii, keycode, modifiers);
}
#ifdef _WIN32_WCE
#pragma mark -