aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/dialogs.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2006-05-29 14:40:18 +0000
committerJohannes Schickel2006-05-29 14:40:18 +0000
commitcba9ef32c21a8b40dbd638fd10796024bb7b6d87 (patch)
tree4e62a37e4abfe55b075bed8828a0ab2e972501d0 /engines/scumm/dialogs.cpp
parent975dd5f1fa3edaa88759312bd79e14e16bc6ab65 (diff)
downloadscummvm-rg350-cba9ef32c21a8b40dbd638fd10796024bb7b6d87.tar.gz
scummvm-rg350-cba9ef32c21a8b40dbd638fd10796024bb7b6d87.tar.bz2
scummvm-rg350-cba9ef32c21a8b40dbd638fd10796024bb7b6d87.zip
adds support for filling the thumbnail display in a given color if no thumbnail is present
svn-id: r22745
Diffstat (limited to 'engines/scumm/dialogs.cpp')
-rw-r--r--engines/scumm/dialogs.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index e552785fff..fb3f217ee6 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -349,6 +349,9 @@ void SaveLoadChooser::handleScreenChanged() {
_time->clearFlags(GUI::WIDGET_INVISIBLE);
_playtime->clearFlags(GUI::WIDGET_INVISIBLE);
+ _fillR = g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillR");
+ _fillG = g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillG");
+ _fillB = g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillB");
updateInfos();
} else {
_container->setFlags(GUI::WIDGET_INVISIBLE);
@@ -365,9 +368,15 @@ void SaveLoadChooser::updateInfos() {
int selItem = _list->getSelected();
Graphics::Surface *thumb;
thumb = _vm->loadThumbnailFromSlot(_saveMode ? selItem + 1 : selItem);
- _gfxWidget->setGfx(thumb);
- if (thumb)
+
+ if (thumb) {
+ _gfxWidget->setGfx(thumb);
+ _gfxWidget->useAlpha(256);
thumb->free();
+ } else {
+ _gfxWidget->setGfx(-1, -1, _fillR, _fillG, _fillB);
+ }
+
delete thumb;
_gfxWidget->draw();