diff options
author | Max Horn | 2008-11-03 18:32:16 +0000 |
---|---|---|
committer | Max Horn | 2008-11-03 18:32:16 +0000 |
commit | 55c10e0ec6f2d6ea7c58ec1e4b74e5552fda5ddc (patch) | |
tree | 4df4d54fc783f837004ab2419c90aaf5c7f5930a /gui/launcher.h | |
parent | 646666125232064f2c4657c4025433b243e42af9 (diff) | |
download | scummvm-rg350-55c10e0ec6f2d6ea7c58ec1e4b74e5552fda5ddc.tar.gz scummvm-rg350-55c10e0ec6f2d6ea7c58ec1e4b74e5552fda5ddc.tar.bz2 scummvm-rg350-55c10e0ec6f2d6ea7c58ec1e4b74e5552fda5ddc.zip |
Patch #2122869: ALL: Common load dialog
svn-id: r34883
Diffstat (limited to 'gui/launcher.h')
-rw-r--r-- | gui/launcher.h | 40 |
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 |