aboutsummaryrefslogtreecommitdiff
path: root/gui/saveload.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2012-06-29 15:52:56 +0200
committerJohannes Schickel2012-06-29 15:52:56 +0200
commitd3e5763276826d3f469fd93077c2f1ef6ef61314 (patch)
tree26d225712e1cc85c0dec17b52730880388ec86f1 /gui/saveload.cpp
parent7860c5bfc93055f1ebcbf037876cd2abd42818c5 (diff)
downloadscummvm-rg350-d3e5763276826d3f469fd93077c2f1ef6ef61314.tar.gz
scummvm-rg350-d3e5763276826d3f469fd93077c2f1ef6ef61314.tar.bz2
scummvm-rg350-d3e5763276826d3f469fd93077c2f1ef6ef61314.zip
GUI: Allow the user to switch between list and thumbnail based load chooser.
Diffstat (limited to 'gui/saveload.cpp')
-rw-r--r--gui/saveload.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/gui/saveload.cpp b/gui/saveload.cpp
index becc3f6b4f..f544f0e6a0 100644
--- a/gui/saveload.cpp
+++ b/gui/saveload.cpp
@@ -83,7 +83,18 @@ int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, con
String oldDomain = ConfMan.getActiveDomainName();
ConfMan.setActiveDomain(target);
- int ret = _impl->run(target, &(**plugin));
+ int ret;
+ do {
+ ret = _impl->run(target, &(**plugin));
+
+ if (ret == kSwitchToList) {
+ delete _impl;
+ _impl = new SaveLoadChooserSimple(_title, _buttonLabel, _saveMode);
+ } else if (ret == kSwitchToGrid) {
+ delete _impl;
+ _impl = new LoadChooserThumbnailed(_title);
+ }
+ } while (ret < -1);
// Revert to the old active domain
ConfMan.setActiveDomain(oldDomain);