aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions/menusystem.cpp
diff options
context:
space:
mode:
authorEric Fry2018-04-18 07:04:47 +1000
committerEugene Sandulenko2018-07-20 06:43:33 +0000
commit783fd028937d1b5c16d945db4dbed3ba8ca307b2 (patch)
treed26b94691b2ebf7ccb23d55e4c38d6befb8bcd9e /engines/illusions/menusystem.cpp
parent95d6171b56eba42a86dad2a7e65341760cf10001 (diff)
downloadscummvm-rg350-783fd028937d1b5c16d945db4dbed3ba8ca307b2.tar.gz
scummvm-rg350-783fd028937d1b5c16d945db4dbed3ba8ca307b2.tar.bz2
scummvm-rg350-783fd028937d1b5c16d945db4dbed3ba8ca307b2.zip
Work on save support
Diffstat (limited to 'engines/illusions/menusystem.cpp')
-rw-r--r--engines/illusions/menusystem.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/illusions/menusystem.cpp b/engines/illusions/menusystem.cpp
index 829756cf2f..4fb0f18834 100644
--- a/engines/illusions/menusystem.cpp
+++ b/engines/illusions/menusystem.cpp
@@ -621,4 +621,28 @@ void MenuActionLoadGame::execute() {
}
+// MenuActionSaveGame
+
+ MenuActionSaveGame::MenuActionSaveGame(BaseMenuSystem *menuSystem, uint choiceIndex)
+ : BaseMenuAction(menuSystem), _choiceIndex(choiceIndex) {
+ }
+
+ void MenuActionSaveGame::execute() {
+ const Plugin *plugin = NULL;
+ EngineMan.findGame(ConfMan.get("gameid"), &plugin);
+ GUI::SaveLoadChooser *dialog;
+ Common::String desc;
+ int slot;
+
+ dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
+ slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
+
+ delete dialog;
+
+ if (slot >= 0) {
+ _menuSystem->setSavegameSlotNum(slot);
+ _menuSystem->selectMenuChoiceIndex(_choiceIndex);
+ }
+ _menuSystem->closeMenu();
+ }
} // End of namespace Illusions