Moved SaveLoadChooser class to saveload.cpp and adjusted dependencies.

svn-id: r27954
This commit is contained in:
Nicola Mettifogo 2007-07-07 19:42:06 +00:00
parent 65ac39fb8b
commit 214cbc40f5
4 changed files with 36 additions and 29 deletions

View File

@ -28,6 +28,7 @@
#include "common/stdafx.h" #include "common/stdafx.h"
#include "common/list.h" #include "common/list.h"
#include "common/rect.h"
namespace Parallaction { namespace Parallaction {

View File

@ -26,6 +26,8 @@
#include "common/stdafx.h" #include "common/stdafx.h"
#include "graphics/iff.h" #include "graphics/iff.h"
#include "graphics/surface.h"
#include "parallaction/parallaction.h" #include "parallaction/parallaction.h"

View File

@ -27,8 +27,7 @@
#define PARALLACTION_H #define PARALLACTION_H
#include "common/str.h" #include "common/str.h"
#include "gui/dialog.h"
#include "gui/widget.h"
#include "engines/engine.h" #include "engines/engine.h"
@ -471,33 +470,6 @@ protected: // members
// FIXME: remove global // FIXME: remove global
extern Parallaction *_vm; 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;
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 } // namespace Parallaction

View File

@ -26,6 +26,7 @@
#include "common/stdafx.h" #include "common/stdafx.h"
#include "common/savefile.h" #include "common/savefile.h"
#include "gui/dialog.h"
#include "gui/widget.h" #include "gui/widget.h"
#include "gui/ListWidget.h" #include "gui/ListWidget.h"
#include "gui/message.h" #include "gui/message.h"
@ -48,6 +49,37 @@ namespace Parallaction {
extern char _gameNames[][20]; extern char _gameNames[][20];
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;
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();
};
void Parallaction::doLoadGame(uint16 slot) { void Parallaction::doLoadGame(uint16 slot) {
_introSarcData3 = 200; _introSarcData3 = 200;