aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorFilippos Karapetis2008-11-09 16:13:34 +0000
committerFilippos Karapetis2008-11-09 16:13:34 +0000
commitf5729a4a8b1b30c66cf3a9553ffb0002c8d7b158 (patch)
treeea7abac525899eacaf581c4107353eb284d863de /gui
parent08eecfd3e55a7a52f523ce3ead18e0e846d7ab2f (diff)
downloadscummvm-rg350-f5729a4a8b1b30c66cf3a9553ffb0002c8d7b158.tar.gz
scummvm-rg350-f5729a4a8b1b30c66cf3a9553ffb0002c8d7b158.tar.bz2
scummvm-rg350-f5729a4a8b1b30c66cf3a9553ffb0002c8d7b158.zip
- The GMM save dialog is now working for all engines which support the appropriate features
- Added a new method to the MetaEngine class, getMaximumSaveSlot(), and implemented it in all engines for which the listSavefiles() method is implemented (it goes together with the listSavefiles method). It is used to fill the unused save slots in the save/load dialogs of each engine, so that the user can create new save games in empty slots - Unified the save/load dialog list numbering in the GMM load/save screens and in the load screen of the main menu (before a game is started) svn-id: r34963
Diffstat (limited to 'gui')
-rw-r--r--gui/launcher.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 4a8211e03c..b4802b06e8 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -483,7 +483,7 @@ SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel)
// Add choice list
_list = new GUI::ListWidget(this, "ScummSaveLoad.List");
- _list->setNumberingMode(GUI::kListNumberingOff);
+ setSaveMode(false);
_gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10);
@@ -541,7 +541,7 @@ const Common::String &SaveLoadChooser::getResultString() const {
void SaveLoadChooser::setSaveMode(bool saveMode) {
_list->setEditable(saveMode);
- _list->setNumberingMode(saveMode ? GUI::kListNumberingOne : GUI::kListNumberingZero);
+ _list->setNumberingMode(GUI::kListNumberingOne);
}
void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
@@ -738,10 +738,18 @@ void SaveLoadChooser::close() {
void SaveLoadChooser::updateSaveList() {
_saveList = (*_plugin)->listSaves(_target.c_str());
+ int curSlot = 0;
StringList saveNames;
for (SaveStateList::const_iterator x = _saveList.begin(); x != _saveList.end(); ++x) {
saveNames.push_back(x->description());
+ curSlot++;
}
+
+ // Fill the rest of the save slots with empty saves
+ Common::String emptyDesc;
+ for (int i = curSlot + 1; i <= (*_plugin)->getMaximumSaveSlot(); i++)
+ saveNames.push_back(emptyDesc);
+
_list->setList(saveNames);
}