aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2002-08-04 00:44:49 +0000
committerMax Horn2002-08-04 00:44:49 +0000
commit72efbd36b62ea8725c21470e81218696225c2c00 (patch)
treec21c4e43289f216c7d195ea44419bc169f762743 /gui
parent40133b475a96169fa5685e2b18774603710c9bf2 (diff)
downloadscummvm-rg350-72efbd36b62ea8725c21470e81218696225c2c00.tar.gz
scummvm-rg350-72efbd36b62ea8725c21470e81218696225c2c00.tar.bz2
scummvm-rg350-72efbd36b62ea8725c21470e81218696225c2c00.zip
NewGUI fixes: save game numbering starts at 0; allow to load autosave
svn-id: r4693
Diffstat (limited to 'gui')
-rw-r--r--gui/dialog.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index 1d37e7ef09..bee8037870 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -32,7 +32,10 @@
/*
* TODO list
- * - if save or load fails, popup an error dialog?
+ * - if save or load fails (e.g. due to disk full/directory write protected),
+ * display an error dialog?
+ * - The user can edit the name of the autosave game. Of course this will not
+ * do anything, but we should still prevent this.
* ...
*/
@@ -293,7 +296,8 @@ SaveLoadDialog::SaveLoadDialog(NewGui *gui)
addButton(200, 100, 54, 16, RES_STRING(8), kQuitCmd, 'Q'); // Quit
_savegameList = new ListWidget(this, 10, 20, 180, 94);
-
+ _savegameList->setNumberingMode(kListNumberingZero);
+
// Get savegame names
ScummVM::StringList l;
char name[32];
@@ -312,7 +316,7 @@ void SaveLoadDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
switch (cmd) {
case kListItemChangedCmd:
case kSaveCmd:
- if (_savegameList->getSelected() > 0 && !_savegameList->getSelectedString().isEmpty()) {
+ if (_savegameList->getSelected() >= 1 && !_savegameList->getSelectedString().isEmpty()) {
Scumm *s = _gui->getScumm();
s->_saveLoadSlot = _savegameList->getSelected();
s->_saveLoadCompatible = false;
@@ -323,7 +327,7 @@ void SaveLoadDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
break;
case kListItemDoubleClickedCmd:
case kLoadCmd:
- if (_savegameList->getSelected() > 0 && !_savegameList->getSelectedString().isEmpty()) {
+ if (_savegameList->getSelected() >= 0 && !_savegameList->getSelectedString().isEmpty()) {
Scumm *s = _gui->getScumm();
s->_saveLoadSlot = _savegameList->getSelected();
s->_saveLoadCompatible = false;