aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorJohannes Schickel2006-04-19 01:07:16 +0000
committerJohannes Schickel2006-04-19 01:07:16 +0000
commit8828daba84a323e2f33dd37a980aded95cae314b (patch)
treeb2814fc2b4fe25c8f721a0266220420641a3e539 /engines/scumm
parent30787714d30e9202890922ec10833e695bc8a3bf (diff)
downloadscummvm-rg350-8828daba84a323e2f33dd37a980aded95cae314b.tar.gz
scummvm-rg350-8828daba84a323e2f33dd37a980aded95cae314b.tar.bz2
scummvm-rg350-8828daba84a323e2f33dd37a980aded95cae314b.zip
Updates scumm dialogs for runtime overlay resolution changes.
svn-id: r22018
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/dialogs.cpp35
-rw-r--r--engines/scumm/dialogs.h3
2 files changed, 36 insertions, 2 deletions
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index d5c1164c9b..a1e57cb7ad 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -281,6 +281,7 @@ public:
SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode);
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+ void handleScreenChanged() { ChooserDialog::handleScreenChanged(); }
const String &getResultString() const;
void setList(const StringList& list) { GUI_ChooserDialog::setList(list); }
int runModal() { return GUI_ChooserDialog::runModal(); }
@@ -511,6 +512,27 @@ void SaveLoadChooserEx::handleCommand(CommandSender *sender, uint32 cmd, uint32
}
void SaveLoadChooserEx::handleScreenChanged() {
+ Dialog::handleScreenChanged();
+
+ int thumbX = g_gui.evaluator()->getVar("scummsaveload_thumbnail.x");
+ int thumbY = g_gui.evaluator()->getVar("scummsaveload_thumbnail.y");
+
+ // Add the thumbnail display
+ _gfxWidget->resize(thumbX, thumbY, kThumbnailWidth + 8,
+ ((_scumm->_system->getHeight() % 200 && _scumm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1) + 8);
+
+ int height = thumbY + ((_scumm->_system->getHeight() % 200 && _scumm->_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1) + 8;
+
+ _date->resize(thumbX, height, kThumbnailWidth + 8, kLineHeight);
+
+ height += kLineHeight;
+
+ _time->resize(thumbX, height, kThumbnailWidth + 8, kLineHeight);
+
+ height += kLineHeight;
+
+ _playtime->resize(thumbX, height, kThumbnailWidth + 8, kLineHeight);
+
int selItem = _list->getSelected();
Graphics::Surface *thumb;
thumb = _scumm->loadThumbnailFromSlot(_saveMode ? selItem + 1 : selItem);
@@ -518,8 +540,6 @@ void SaveLoadChooserEx::handleScreenChanged() {
if (thumb)
thumb->free();
delete thumb;
-
- Dialog::handleScreenChanged();
}
#pragma mark -
@@ -617,6 +637,17 @@ void MainMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
}
}
+void MainMenuDialog::handleScreenChanged() {
+ _optionsDialog->handleScreenChanged();
+ _aboutDialog->handleScreenChanged();
+ _saveDialog->handleScreenChanged();
+ _loadDialog->handleScreenChanged();
+#ifndef DISABLE_HELP
+ _helpDialog->handleScreenChanged();
+#endif
+ ScummDialog::handleScreenChanged();
+}
+
void MainMenuDialog::save() {
int idx;
_saveDialog->setList(generateSavegameList(_vm, true));
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 03a2844072..3712b4d370 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -64,6 +64,8 @@ public:
virtual const Common::String &getResultString() const = 0;
virtual void setList(const Common::StringList& list) = 0;
virtual int runModal() = 0;
+
+ virtual void handleScreenChanged() = 0;
};
class MainMenuDialog : public ScummDialog {
@@ -71,6 +73,7 @@ public:
MainMenuDialog(ScummEngine *scumm);
~MainMenuDialog();
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
+ virtual void handleScreenChanged();
protected:
GUI::Dialog *_aboutDialog;