[Scummvm-cvs-logs] SF.net SVN: scummvm: [22025] scummvm/trunk/gui
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Tue Apr 18 23:23:02 CEST 2006
Revision: 22025
Author: lordhoto
Date: 2006-04-18 23:22:15 -0700 (Tue, 18 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22025&view=rev
Log Message:
-----------
Adds handleScreenChanged() to NewGui, so (scumm) engine can call it when it recives a EVENT_SCREEN_CHANGED.
Modified Paths:
--------------
scummvm/trunk/gui/ThemeClassic.cpp
scummvm/trunk/gui/ThemeNew.cpp
scummvm/trunk/gui/newgui.cpp
scummvm/trunk/gui/newgui.h
scummvm/trunk/gui/theme.h
Modified: scummvm/trunk/gui/ThemeClassic.cpp
===================================================================
--- scummvm/trunk/gui/ThemeClassic.cpp 2006-04-19 06:00:34 UTC (rev 22024)
+++ scummvm/trunk/gui/ThemeClassic.cpp 2006-04-19 06:22:15 UTC (rev 22025)
@@ -79,7 +79,8 @@
_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 @@
resetDrawArea();
_system->showOverlay();
clearAll();
+ _enabled = true;
}
void ThemeClassic::disable() {
_system->hideOverlay();
+ _enabled = false;
}
void ThemeClassic::openDialog(bool topDialog) {
Modified: scummvm/trunk/gui/ThemeNew.cpp
===================================================================
--- scummvm/trunk/gui/ThemeNew.cpp 2006-04-19 06:00:34 UTC (rev 22024)
+++ scummvm/trunk/gui/ThemeNew.cpp 2006-04-19 06:22:15 UTC (rev 22025)
@@ -354,7 +354,8 @@
void ThemeNew::refresh() {
init();
resetupGuiRenderer();
- _system->showOverlay();
+ if (_enabled)
+ _system->showOverlay();
}
void ThemeNew::enable() {
@@ -364,12 +365,14 @@
_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) {
Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp 2006-04-19 06:00:34 UTC (rev 22024)
+++ scummvm/trunk/gui/newgui.cpp 2006-04-19 06:22:15 UTC (rev 22025)
@@ -334,5 +334,8 @@
return (WidgetSize)(_theme->_evaluator->getVar("widgetSize"));
}
+void NewGui::handleScreenChange() {
+ _theme->refresh();
+}
} // End of namespace GUI
Modified: scummvm/trunk/gui/newgui.h
===================================================================
--- scummvm/trunk/gui/newgui.h 2006-04-19 06:00:34 UTC (rev 22024)
+++ scummvm/trunk/gui/newgui.h 2006-04-19 06:22:15 UTC (rev 22025)
@@ -80,7 +80,7 @@
WidgetSize getWidgetSize();
-
+ void handleScreenChange();
protected:
OSystem *_system;
Modified: scummvm/trunk/gui/theme.h
===================================================================
--- scummvm/trunk/gui/theme.h 2006-04-19 06:00:34 UTC (rev 22024)
+++ scummvm/trunk/gui/theme.h 2006-04-19 06:22:15 UTC (rev 22025)
@@ -262,6 +262,7 @@
bool _forceRedraw;
bool _initOk;
+ bool _enabled;
const Graphics::Font *_font;
OverlayColor _color, _shadowcolor;
@@ -356,6 +357,7 @@
bool _initOk;
bool _forceRedraw;
+ bool _enabled;
int _lastUsedBitMask;
void resetupGuiRenderer();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list