diff options
author | Johannes Schickel | 2006-04-17 18:50:33 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-04-17 18:50:33 +0000 |
commit | 955b53fb883451a7d3079ee28dc6f0fd07d606ab (patch) | |
tree | e8db4a4ae884d5be500b0f250b3277c236e603f4 /gui | |
parent | 43143daca7b4a7137252e125bb9319e3e26f6ee9 (diff) | |
download | scummvm-rg350-955b53fb883451a7d3079ee28dc6f0fd07d606ab.tar.gz scummvm-rg350-955b53fb883451a7d3079ee28dc6f0fd07d606ab.tar.bz2 scummvm-rg350-955b53fb883451a7d3079ee28dc6f0fd07d606ab.zip |
Fixes bug with wrong colors in the logo after a screen change. (this time it works!)
svn-id: r21984
Diffstat (limited to 'gui')
-rw-r--r-- | gui/launcher.cpp | 18 | ||||
-rw-r--r-- | gui/launcher.h | 4 |
2 files changed, 14 insertions, 8 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp index f7cd658716..73f5471f03 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -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(); diff --git a/gui/launcher.h b/gui/launcher.h index 44d4e51c50..b5320937c4 100644 --- a/gui/launcher.h +++ b/gui/launcher.h @@ -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; |