diff options
author | Johannes Schickel | 2006-05-29 14:40:18 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-05-29 14:40:18 +0000 |
commit | cba9ef32c21a8b40dbd638fd10796024bb7b6d87 (patch) | |
tree | 4e62a37e4abfe55b075bed8828a0ab2e972501d0 | |
parent | 975dd5f1fa3edaa88759312bd79e14e16bc6ab65 (diff) | |
download | scummvm-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
-rw-r--r-- | engines/scumm/dialogs.cpp | 13 | ||||
-rw-r--r-- | engines/scumm/dialogs.h | 2 |
2 files changed, 13 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(); diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h index 339b890558..48a84ddfbd 100644 --- a/engines/scumm/dialogs.h +++ b/engines/scumm/dialogs.h @@ -64,6 +64,8 @@ protected: GUI::ContainerWidget *_container; ScummEngine *_vm; + uint8 _fillR, _fillG, _fillB; + void updateInfos(); public: SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode, ScummEngine *engine); |