aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-07-08 12:21:40 +0000
committerTorbjörn Andersson2004-07-08 12:21:40 +0000
commit8f6a61991343a298f628724e044f9ec593c9add0 (patch)
treedb865029b83dd861ff70ed5cd10fec068ec3a969 /sky
parentb0cf75722e8652636c2b5e3ee512b7252eb3bb98 (diff)
downloadscummvm-rg350-8f6a61991343a298f628724e044f9ec593c9add0.tar.gz
scummvm-rg350-8f6a61991343a298f628724e044f9ec593c9add0.tar.bz2
scummvm-rg350-8f6a61991343a298f628724e044f9ec593c9add0.zip
(Ab)used the yes/no dialog to show an error message if saving a game fails.
As far as I can tell, writing a proper one-button dialog is tricky. It can't re-use a button from the yes/no dialog since the whole thing appears to be just one sprite! svn-id: r14178
Diffstat (limited to 'sky')
-rw-r--r--sky/control.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/sky/control.cpp b/sky/control.cpp
index 5e30a68b3c..91b775ece3 100644
--- a/sky/control.cpp
+++ b/sky/control.cpp
@@ -882,8 +882,17 @@ uint16 Control::saveRestorePanel(bool allowSave) {
_selectedGame = _firstText;
refreshNames = true;
}
- if ((clickRes == CANCEL_PRESSED) || (clickRes == NO_DISK_SPACE) ||
- (clickRes == GAME_RESTORED))
+ if (clickRes == NO_DISK_SPACE) {
+ // HACK: The error dialog will have two buttons, one
+ // for yes and one for no. And we just won't care
+ // which one the user presses. As far as I can tell,
+ // making a proper dialog is tricky, since the yes/no
+ // buttons are actually one single sprite.
+ char saveFailed[] = "Could not save!";
+ getYesNo(saveFailed);
+ quitPanel = true;
+ }
+ if ((clickRes == CANCEL_PRESSED) || (clickRes == GAME_RESTORED))
quitPanel = true;
if (clickRes == GAME_SAVED) {