Fixes bug with wrong colors in the logo after a screen change. (this time it works!)

svn-id: r21984
This commit is contained in:
Johannes Schickel 2006-04-17 18:50:33 +00:00
parent 43143daca7
commit 955b53fb88
2 changed files with 14 additions and 8 deletions

View File

@ -444,13 +444,14 @@ LauncherDialog::LauncherDialog(GameDetector &detector)
_w = screenW;
_h = screenH;
_logo = 0;
#ifndef DISABLE_FANCY_THEMES
if (g_gui.evaluator()->getVar("launcher_logo.visible") == 1) {
GraphicsWidget *logo = new GraphicsWidget(this, "launcher_logo");
_logo = new GraphicsWidget(this, "launcher_logo");
ThemeNew *th = (ThemeNew *)g_gui.theme();
logo->useTransparency(true);
_logo->useTransparency(true);
logo->setGfx(th->getImageSurface(th->kThemeLogo));
_logo->setGfx(th->getImageSurface(th->kThemeLogo));
new StaticTextWidget(this, "launcher_version", gScummVMVersionDate);
} else
@ -766,13 +767,14 @@ void LauncherDialog::updateButtons() {
void LauncherDialog::handleScreenChanged() {
#ifndef DISABLE_FANCY_THEMES
if (g_gui.evaluator()->getVar("launcher_logo.visible") == 1) {
GraphicsWidget *logo = new GraphicsWidget(this, "launcher_logo");
if (!_logo)
_logo = new GraphicsWidget(this, "launcher_logo");
ThemeNew *th = (ThemeNew *)g_gui.theme();
logo->useTransparency(true);
_logo->useTransparency(true);
logo->setGfx(th->getImageSurface(th->kThemeLogo));
new StaticTextWidget(this, "launcher_version", gScummVMVersionDate);
_logo->setGfx(th->getImageSurface(th->kThemeLogo));
} else {
delete _logo;
}
#endif
Dialog::handleScreenChanged();

View File

@ -31,6 +31,7 @@ namespace GUI {
class BrowserDialog;
class ListWidget;
class GraphicsWidget;
class LauncherDialog : public Dialog {
typedef Common::String String;
@ -46,6 +47,9 @@ protected:
Widget *_startButton;
Widget *_editButton;
Widget *_removeButton;
#ifndef DISABLE_FANCY_THEMES
GraphicsWidget *_logo;
#endif
StringList _domains;
GameDetector &_detector;
BrowserDialog *_browser;