aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2008-11-03 18:32:16 +0000
committerMax Horn2008-11-03 18:32:16 +0000
commit55c10e0ec6f2d6ea7c58ec1e4b74e5552fda5ddc (patch)
tree4df4d54fc783f837004ab2419c90aaf5c7f5930a /gui
parent646666125232064f2c4657c4025433b243e42af9 (diff)
downloadscummvm-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')
-rw-r--r--gui/launcher.cpp39
-rw-r--r--gui/launcher.h40
-rw-r--r--gui/object.h2
-rw-r--r--gui/themes/scummclassic.zipbin43354 -> 43733 bytes
-rw-r--r--gui/themes/scummclassic/classic_layout.stx9
-rw-r--r--gui/themes/scummclassic/classic_layout_320.stx9
-rw-r--r--gui/themes/scummmodern.zipbin143656 -> 144052 bytes
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx9
-rw-r--r--gui/themes/scummmodern/scummmodern_layout_320.stx9
9 files changed, 77 insertions, 40 deletions
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
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files 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'
/>
<space size = '10'/>
+ <widget name = 'Load'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'Save'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '10'/>
<widget name = 'Options'
width = '150'
height = 'Globals.Button.Height'
diff --git a/gui/themes/scummclassic/classic_layout_320.stx b/gui/themes/scummclassic/classic_layout_320.stx
index 7d925be9cb..921e3ff5eb 100644
--- a/gui/themes/scummclassic/classic_layout_320.stx
+++ b/gui/themes/scummclassic/classic_layout_320.stx
@@ -465,6 +465,15 @@
height = 'Globals.Button.Height'
/>
<space size = '4'/>
+ <widget name = 'Load'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'Save'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '4'/>
<widget name = 'Options'
width = '70'
height = 'Globals.Button.Height'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 0de77c92fc..b4244ec2ef 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index ebf273ccf5..7e463894ff 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -476,6 +476,15 @@
height = 'Globals.Button.Height'
/>
<space size = '10'/>
+ <widget name = 'Load'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'Save'
+ width = '150'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '10'/>
<widget name = 'Options'
width = '150'
height = 'Globals.Button.Height'
diff --git a/gui/themes/scummmodern/scummmodern_layout_320.stx b/gui/themes/scummmodern/scummmodern_layout_320.stx
index c135d7e03a..85a5b4b241 100644
--- a/gui/themes/scummmodern/scummmodern_layout_320.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_320.stx
@@ -462,6 +462,15 @@
height = 'Globals.Button.Height'
/>
<space size = '4'/>
+ <widget name = 'Load'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <widget name = 'Save'
+ width = '70'
+ height = 'Globals.Button.Height'
+ />
+ <space size = '4'/>
<widget name = 'Options'
width = '70'
height = 'Globals.Button.Height'