[Scummvm-cvs-logs] CVS: scummvm/sky control.cpp,1.71,1.72
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Thu Jul 8 05:22:39 CEST 2004
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6734
Modified Files:
control.cpp
Log Message:
(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!
Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/control.cpp,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- control.cpp 25 Jun 2004 22:39:20 -0000 1.71
+++ control.cpp 8 Jul 2004 12:21:40 -0000 1.72
@@ -882,8 +882,17 @@
_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) {
More information about the Scummvm-git-logs
mailing list