aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/wage.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-21 11:09:29 +0100
committerEugene Sandulenko2016-02-14 17:12:49 +0100
commit936609fb11e9a75f7cb5b2f0d5e22c94a7e0ff80 (patch)
tree6d77aafda7145d305a5ed419954080cf4fbd86c7 /engines/wage/wage.cpp
parentc7eed7f0ad4b3c23694c1b97578a4b8b86be54f9 (diff)
downloadscummvm-rg350-936609fb11e9a75f7cb5b2f0d5e22c94a7e0ff80.tar.gz
scummvm-rg350-936609fb11e9a75f7cb5b2f0d5e22c94a7e0ff80.tar.bz2
scummvm-rg350-936609fb11e9a75f7cb5b2f0d5e22c94a7e0ff80.zip
WAGE: Implemented saveDialog()
Diffstat (limited to 'engines/wage/wage.cpp')
-rw-r--r--engines/wage/wage.cpp17
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++)