From 55c10e0ec6f2d6ea7c58ec1e4b74e5552fda5ddc Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 3 Nov 2008 18:32:16 +0000 Subject: Patch #2122869: ALL: Common load dialog svn-id: r34883 --- gui/launcher.cpp | 39 --------------------- gui/launcher.h | 40 ++++++++++++++++++++++ gui/object.h | 2 +- gui/themes/scummclassic.zip | Bin 43354 -> 43733 bytes gui/themes/scummclassic/classic_layout.stx | 9 +++++ gui/themes/scummclassic/classic_layout_320.stx | 9 +++++ gui/themes/scummmodern.zip | Bin 143656 -> 144052 bytes gui/themes/scummmodern/scummmodern_layout.stx | 9 +++++ gui/themes/scummmodern/scummmodern_layout_320.stx | 9 +++++ 9 files changed, 77 insertions(+), 40 deletions(-) (limited to 'gui') diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 55489e2017..9a201fd936 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -473,45 +473,6 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat } } -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(); -}; - SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel) : Dialog("ScummSaveLoad"), _delSupport(0), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) { _delSupport = _metaInfoSupport = _thumbnailSupport = _saveDateSupport = _playTimeSupport = false; 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 diff --git a/gui/object.h b/gui/object.h index 01046bd668..d188807a16 100644 --- a/gui/object.h +++ b/gui/object.h @@ -67,7 +67,7 @@ protected: Widget *_firstWidget; public: - GuiObject(int x, int y, int w, int h) : _x(x), _y(y), _w(w), _h(h), _name(""), _firstWidget(0) { } + GuiObject(int x, int y, int w, int h) : _x(x), _y(y), _w(w), _h(h), _firstWidget(0) { } GuiObject(const Common::String &name); ~GuiObject(); diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip index 3ee5730303..2d6dd7b113 100644 Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx index 42e6eaebd7..c663c16853 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -464,6 +464,15 @@ height = 'Globals.Button.Height' /> + + + + + + + + + + + +