mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-22 18:02:05 +00:00
TSAGE: Changed demo quit dialog to correctly handle ESCAPE and ENTER keys
This commit is contained in:
parent
d610b40f78
commit
f1e3bb92b9
@ -40,7 +40,17 @@ Scene *RingworldDemoGame::createScene(int sceneNumber) {
|
||||
}
|
||||
|
||||
void RingworldDemoGame::quitGame() {
|
||||
if (MessageDialog::show(DEMO_EXIT_MSG, EXIT_BTN_STRING, DEMO_BTN_STRING) == 0)
|
||||
_globals->_events.setCursor(CURSOR_ARROW);
|
||||
MessageDialog *dlg = new MessageDialog(DEMO_EXIT_MSG, EXIT_BTN_STRING, DEMO_BTN_STRING);
|
||||
dlg->draw();
|
||||
|
||||
GfxButton *selectedButton = dlg->execute(&dlg->_btn2);
|
||||
bool exitFlag = selectedButton != &dlg->_btn2;
|
||||
|
||||
delete dlg;
|
||||
_globals->_events.hideCursor();
|
||||
|
||||
if (exitFlag)
|
||||
_vm->quitGame();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user