diff options
author | Nicola Mettifogo | 2007-02-11 21:17:37 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-02-11 21:17:37 +0000 |
commit | f0cdab74a5604bc9279e7519b5b826ff45cfee61 (patch) | |
tree | 2a09cebb084c0ebfa7ee8e35722f188fea56062c /engines/parallaction/parallaction.h | |
parent | f3141ba2a0a2c0a2ce2b6cd47d65d390980a3665 (diff) | |
download | scummvm-rg350-f0cdab74a5604bc9279e7519b5b826ff45cfee61.tar.gz scummvm-rg350-f0cdab74a5604bc9279e7519b5b826ff45cfee61.tar.bz2 scummvm-rg350-f0cdab74a5604bc9279e7519b5b826ff45cfee61.zip |
added load/save support
svn-id: r25496
Diffstat (limited to 'engines/parallaction/parallaction.h')
-rw-r--r-- | engines/parallaction/parallaction.h | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 5da24517f4..112aefc84e 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -26,6 +26,14 @@ #include "engines/engine.h" #include "parallaction/defs.h" #include "parallaction/inventory.h" +#include "common/str.h" +#include "gui/dialog.h" +#include "gui/widget.h" + +namespace GUI { + class ListWidget; + class CommandSender; +} namespace Parallaction { @@ -290,8 +298,11 @@ protected: // members void initGame(); void initGlobals(); - void doLoadGame(uint16 _di); - void doSaveGame(uint16 _di); + Common::String _saveFileName; + int buildSaveFileList(Common::StringList& l); + int selectSaveFile(uint16 arg_0); + void doLoadGame(uint16 slot); + void doSaveGame(uint16 slot, const char* name); void runGame(); InputData * translateInput(); @@ -315,6 +326,34 @@ protected: // members // FIXME: remove global extern Parallaction *_vm; +class SaveLoadChooser : public GUI::Dialog { + typedef Common::String String; + typedef Common::StringList StringList; +protected: + GUI::ListWidget *_list; + GUI::ButtonWidget *_chooseButton; + GUI::GraphicsWidget *_gfxWidget; + GUI::StaticTextWidget *_date; + GUI::StaticTextWidget *_time; + GUI::StaticTextWidget *_playtime; + GUI::ContainerWidget *_container; + Parallaction *_vm; + + uint8 _fillR, _fillG, _fillB; + + void updateInfos(); +public: + SaveLoadChooser(const String &title, const String &buttonLabel, Parallaction *engine); + ~SaveLoadChooser(); + + virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + const String &getResultString() const; + void setList(const StringList& list); + int runModal(); + + virtual void reflowLayout(); +}; + } // namespace Parallaction |