diff options
author | Johannes Schickel | 2006-04-19 06:22:15 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-04-19 06:22:15 +0000 |
commit | 9e734b0851915924d1fc3115bbca0a3bd9a271a2 (patch) | |
tree | 1ea1f860e9a8dfd8ccbe1c7fb4a70fc4fff6447f | |
parent | 1c65f3417af37329284a0f36f4b451d11308660a (diff) | |
download | scummvm-rg350-9e734b0851915924d1fc3115bbca0a3bd9a271a2.tar.gz scummvm-rg350-9e734b0851915924d1fc3115bbca0a3bd9a271a2.tar.bz2 scummvm-rg350-9e734b0851915924d1fc3115bbca0a3bd9a271a2.zip |
Adds handleScreenChanged() to NewGui, so (scumm) engine can call it when it recives a EVENT_SCREEN_CHANGED.
svn-id: r22025
-rw-r--r-- | gui/ThemeClassic.cpp | 5 | ||||
-rw-r--r-- | gui/ThemeNew.cpp | 5 | ||||
-rw-r--r-- | gui/newgui.cpp | 3 | ||||
-rw-r--r-- | gui/newgui.h | 2 | ||||
-rw-r--r-- | gui/theme.h | 2 |
5 files changed, 14 insertions, 3 deletions
diff --git a/gui/ThemeClassic.cpp b/gui/ThemeClassic.cpp index bda8836af5..69a5690b03 100644 --- a/gui/ThemeClassic.cpp +++ b/gui/ThemeClassic.cpp @@ -79,7 +79,8 @@ void ThemeClassic::refresh() { _shadowcolor = _system->RGBToColor(64, 64, 64); _textcolor = _system->RGBToColor(32, 160, 32); _textcolorhi = _system->RGBToColor(0, 255, 0); - _system->showOverlay(); + if (_enabled) + _system->showOverlay(); } void ThemeClassic::enable() { @@ -87,10 +88,12 @@ void ThemeClassic::enable() { resetDrawArea(); _system->showOverlay(); clearAll(); + _enabled = true; } void ThemeClassic::disable() { _system->hideOverlay(); + _enabled = false; } void ThemeClassic::openDialog(bool topDialog) { diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp index 2b32425996..fc10da82c1 100644 --- a/gui/ThemeNew.cpp +++ b/gui/ThemeNew.cpp @@ -354,7 +354,8 @@ void ThemeNew::deinit() { void ThemeNew::refresh() { init(); resetupGuiRenderer(); - _system->showOverlay(); + if (_enabled) + _system->showOverlay(); } void ThemeNew::enable() { @@ -364,12 +365,14 @@ void ThemeNew::enable() { _system->showOverlay(); clearAll(); setUpCursor(); + _enabled = true; } void ThemeNew::disable() { _system->hideOverlay(); _system->setPalette(_backUpCols, 0, MAX_CURS_COLORS); _needPaletteUpdates = false; + _enabled = false; } void ThemeNew::openDialog(bool topDialog) { diff --git a/gui/newgui.cpp b/gui/newgui.cpp index d54d85be53..a863f6e3c2 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -334,5 +334,8 @@ WidgetSize NewGui::getWidgetSize() { return (WidgetSize)(_theme->_evaluator->getVar("widgetSize")); } +void NewGui::handleScreenChange() { + _theme->refresh(); +} } // End of namespace GUI diff --git a/gui/newgui.h b/gui/newgui.h index 9e46738162..58bdf4715b 100644 --- a/gui/newgui.h +++ b/gui/newgui.h @@ -80,7 +80,7 @@ public: WidgetSize getWidgetSize(); - + void handleScreenChange(); protected: OSystem *_system; diff --git a/gui/theme.h b/gui/theme.h index e641148eda..b1defc17cf 100644 --- a/gui/theme.h +++ b/gui/theme.h @@ -262,6 +262,7 @@ private: bool _forceRedraw; bool _initOk; + bool _enabled; const Graphics::Font *_font; OverlayColor _color, _shadowcolor; @@ -356,6 +357,7 @@ private: bool _initOk; bool _forceRedraw; + bool _enabled; int _lastUsedBitMask; void resetupGuiRenderer(); |