diff options
Diffstat (limited to 'engines/wage/wage.cpp')
-rw-r--r-- | engines/wage/wage.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp index 9cb3a01739..9ecd4c7d5b 100644 --- a/engines/wage/wage.cpp +++ b/engines/wage/wage.cpp @@ -140,6 +140,7 @@ void WageEngine::processEvents() { while (_eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_QUIT: + saveDialog(); _shouldQuit = true; break; case Common::EVENT_MOUSEMOVE: @@ -222,13 +223,27 @@ void WageEngine::gameOver() { buttons.push_back(new DialogButton("OK", 66, 67, 68, 28)); - Dialog gameOver(_gui, _world->_gameOverMessage->c_str(), &buttons); + Dialog gameOver(_gui, 199, _world->_gameOverMessage->c_str(), &buttons, 0); gameOver.run(); doClose(); } +void WageEngine::saveDialog() { + DialogButtonArray buttons; + + buttons.push_back(new DialogButton("No", 19, 67, 68, 28)); + buttons.push_back(new DialogButton("Yes", 112, 67, 68, 28)); + buttons.push_back(new DialogButton("Cancel", 205, 67, 68, 28)); + + Dialog save(_gui, 291, "Save changes before closing?", &buttons, 1); + + save.run(); + + doClose(); +} + void WageEngine::performInitialSetup() { debug(5, "Resetting Objs: %d", _world->_orderedObjs.size()); for (uint i = 0; i < _world->_orderedObjs.size() - 1; i++) |