aboutsummaryrefslogtreecommitdiff
path: root/gui/launcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/launcher.h')
-rw-r--r--gui/launcher.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/gui/launcher.h b/gui/launcher.h
index 1b2b0a354e..7e04e865f9 100644
--- a/gui/launcher.h
+++ b/gui/launcher.h
@@ -27,6 +27,7 @@
#include "gui/dialog.h"
#include "engines/game.h"
+#include "engines/metaengine.h"
#include "common/str.h"
namespace GUI {
@@ -79,6 +80,45 @@ protected:
void selectGame(const String &name);
};
+class SaveLoadChooser : public GUI::Dialog {
+ typedef Common::String String;
+ typedef Common::StringList StringList;
+protected:
+ GUI::ListWidget *_list;
+ GUI::ButtonWidget *_chooseButton;
+ GUI::ButtonWidget *_deleteButton;
+ GUI::GraphicsWidget *_gfxWidget;
+ GUI::ContainerWidget *_container;
+ GUI::StaticTextWidget *_date;
+ GUI::StaticTextWidget *_time;
+ GUI::StaticTextWidget *_playtime;
+
+ const EnginePlugin *_plugin;
+ bool _delSupport;
+ bool _metaInfoSupport;
+ bool _thumbnailSupport;
+ bool _saveDateSupport;
+ bool _playTimeSupport;
+ String _target;
+ SaveStateList _saveList;
+
+ uint8 _fillR, _fillG, _fillB;
+
+ void updateSaveList();
+ void updateSelection(bool redraw);
+public:
+ SaveLoadChooser(const String &title, const String &buttonLabel);
+ ~SaveLoadChooser();
+
+ virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
+ void setList(const StringList& list);
+ int runModal(const EnginePlugin *plugin, const String &target);
+
+ virtual void reflowLayout();
+
+ virtual void close();
+};
+
} // End of namespace GUI
#endif