From 88b4bbb95243eeecc3dd3a204a33cced1ca4c2c6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 5 Jan 2010 22:18:09 +0000 Subject: 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 --- engines/scumm/dialogs.cpp | 10 +++++++--- engines/scumm/dialogs.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'engines') 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: -- cgit v1.2.3