diff options
author | Johannes Schickel | 2006-04-16 20:33:52 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-04-16 20:33:52 +0000 |
commit | b99632831f417d751d41deddc3a7b00b3dcc56b3 (patch) | |
tree | 4a4b634a77f8b62f96264f6eba5447ee8b55f1c0 /gui | |
parent | e9cbf5fcbd1af19d1936593d1de736c0e0e91f89 (diff) | |
download | scummvm-rg350-b99632831f417d751d41deddc3a7b00b3dcc56b3.tar.gz scummvm-rg350-b99632831f417d751d41deddc3a7b00b3dcc56b3.tar.bz2 scummvm-rg350-b99632831f417d751d41deddc3a7b00b3dcc56b3.zip |
This should fix wrong colors of the scummvm logo in the new theme after screen change.
svn-id: r21953
Diffstat (limited to 'gui')
-rw-r--r-- | gui/dialog.h | 2 | ||||
-rw-r--r-- | gui/launcher.cpp | 15 | ||||
-rw-r--r-- | gui/launcher.h | 2 | ||||
-rw-r--r-- | gui/newgui.cpp | 5 |
4 files changed, 22 insertions, 2 deletions
diff --git a/gui/dialog.h b/gui/dialog.h index 9448de2f7e..dde9ec0976 100644 --- a/gui/dialog.h +++ b/gui/dialog.h @@ -76,7 +76,7 @@ protected: virtual void handleKeyUp(uint16 ascii, int keycode, int modifiers); virtual void handleMouseMoved(int x, int y, int button); virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); - void handleScreenChanged(); + virtual void handleScreenChanged(); Widget *findWidget(int x, int y); // Find the widget at pos x,y if any diff --git a/gui/launcher.cpp b/gui/launcher.cpp index de47a1946a..f7cd658716 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -763,4 +763,19 @@ 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"); + ThemeNew *th = (ThemeNew *)g_gui.theme(); + logo->useTransparency(true); + + logo->setGfx(th->getImageSurface(th->kThemeLogo)); + + new StaticTextWidget(this, "launcher_version", gScummVMVersionDate); + } +#endif + Dialog::handleScreenChanged(); +} + } // End of namespace GUI diff --git a/gui/launcher.h b/gui/launcher.h index f412598112..44d4e51c50 100644 --- a/gui/launcher.h +++ b/gui/launcher.h @@ -50,6 +50,8 @@ protected: GameDetector &_detector; BrowserDialog *_browser; + virtual void handleScreenChanged(); + void updateListing(); void updateButtons(); diff --git a/gui/newgui.cpp b/gui/newgui.cpp index ea43be07b1..20d79e8ffc 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -235,7 +235,10 @@ void NewGui::runLoop() { // reinit the whole theme _theme->refresh(); _needRedraw = true; - activeDialog->handleScreenChanged(); + // refresh all dialogs + for (i = 0; i < _dialogStack.size(); ++i) { + activeDialog->handleScreenChanged(); + } break; } } |