aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-05 22:18:09 +0000
committerJohannes Schickel2010-01-05 22:18:09 +0000
commit88b4bbb95243eeecc3dd3a204a33cced1ca4c2c6 (patch)
treee21088aaca2dc142ff4c239dd457da02878f49b1 /engines
parent841e2d34242418ed0c86a6d8d3a4a97faa085ae6 (diff)
downloadscummvm-rg350-88b4bbb95243eeecc3dd3a204a33cced1ca4c2c6.tar.gz
scummvm-rg350-88b4bbb95243eeecc3dd3a204a33cced1ca4c2c6.tar.bz2
scummvm-rg350-88b4bbb95243eeecc3dd3a204a33cced1ca4c2c6.zip
Fix broken Scumm dialogs, which is a regression from r46947. (They used a dummy name, which didn't exist in the theme config and later on just calculated the size on their own...)
svn-id: r47057
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/dialogs.cpp10
-rw-r--r--engines/scumm/dialogs.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 53097b6815..3c329915f6 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -207,6 +207,10 @@ static const ResString string_map_table_v345[] = {
#pragma mark -
+ScummDialog::ScummDialog(int x, int y, int w, int h) : GUI::Dialog(x, y, w, h) {
+ _backgroundType = GUI::ThemeEngine::kDialogBackgroundSpecial;
+}
+
ScummDialog::ScummDialog(String name) : GUI::Dialog(name) {
_backgroundType = GUI::ThemeEngine::kDialogBackgroundSpecial;
}
@@ -542,7 +546,7 @@ void HelpDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
#pragma mark -
InfoDialog::InfoDialog(ScummEngine *scumm, int res)
-: ScummDialog("scummDummyDialog"), _vm(scumm) { // dummy x and w
+: ScummDialog(0, 0, 0, 0), _vm(scumm) { // dummy x and w
_message = queryResString(res);
@@ -551,7 +555,7 @@ InfoDialog::InfoDialog(ScummEngine *scumm, int res)
}
InfoDialog::InfoDialog(ScummEngine *scumm, const String& message)
-: ScummDialog("scummDummyDialog"), _vm(scumm) { // dummy x and w
+: ScummDialog(0, 0, 0, 0), _vm(scumm) { // dummy x and w
_message = message;
@@ -652,7 +656,7 @@ void ConfirmDialog::handleKeyDown(Common::KeyState state) {
ValueDisplayDialog::ValueDisplayDialog(const Common::String& label, int minVal, int maxVal,
int val, uint16 incKey, uint16 decKey)
- : GUI::Dialog("scummDummyDialog"),
+ : GUI::Dialog(0, 0, 0, 0),
_label(label), _min(minVal), _max(maxVal),
_value(val), _incKey(incKey), _decKey(decKey) {
assert(_min <= _value && _value <= _max);
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 644c028c5e..29cee93573 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -48,6 +48,7 @@ class ScummEngine;
class ScummDialog : public GUI::Dialog {
public:
+ ScummDialog(int x, int y, int w, int h);
ScummDialog(Common::String name);
protected: