From b99632831f417d751d41deddc3a7b00b3dcc56b3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 16 Apr 2006 20:33:52 +0000 Subject: This should fix wrong colors of the scummvm logo in the new theme after screen change. svn-id: r21953 --- gui/dialog.h | 2 +- gui/launcher.cpp | 15 +++++++++++++++ gui/launcher.h | 2 ++ gui/newgui.cpp | 5 ++++- 4 files changed, 22 insertions(+), 2 deletions(-) (limited to 'gui') 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; } } -- cgit v1.2.3