aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-05-09 23:16:02 +0300
committerEugene Sandulenko2016-06-01 13:16:12 +0200
commita612b0a173eefc80d635a2711cd9f20e4601839d (patch)
tree28d08b6fe96c5d57ae5c351e0b4c187ee1c8d0f1
parentc7ad2155fc9153b700d55aea08eafa03d7343fc8 (diff)
downloadscummvm-rg350-a612b0a173eefc80d635a2711cd9f20e4601839d.tar.gz
scummvm-rg350-a612b0a173eefc80d635a2711cd9f20e4601839d.tar.bz2
scummvm-rg350-a612b0a173eefc80d635a2711cd9f20e4601839d.zip
GRAPHICS: Restore layout debugging capabilities
-rw-r--r--gui/ThemeEngine.cpp9
-rw-r--r--gui/ThemeLayout.cpp2
-rw-r--r--gui/ThemeLayout.h2
3 files changed, 10 insertions, 3 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index aec5c79dab..90cb612e19 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -1265,8 +1265,15 @@ void ThemeEngine::updateScreen(bool render) {
_screenQueue.clear();
}
- if (render)
+ if (render) {
+#ifdef LAYOUT_DEBUG_DIALOG
+ _vectorRenderer->fillSurface();
+ _themeEval->debugDraw(&_screen, _font);
+ _vectorRenderer->copyWholeFrame(_system);
+#else
renderDirtyScreen();
+#endif
+ }
}
void ThemeEngine::addDirtyRect(Common::Rect r) {
diff --git a/gui/ThemeLayout.cpp b/gui/ThemeLayout.cpp
index 6a6fd9e343..71e4b2c9fd 100644
--- a/gui/ThemeLayout.cpp
+++ b/gui/ThemeLayout.cpp
@@ -123,7 +123,7 @@ int16 ThemeLayoutStacked::getParentHeight() {
#ifdef LAYOUT_DEBUG_DIALOG
void ThemeLayout::debugDraw(Graphics::Surface *screen, const Graphics::Font *font) {
- uint16 color = 0xFFFF;
+ uint32 color = 0xFFFFFFFF;
font->drawString(screen, getName(), _x, _y, _w, color, Graphics::kTextAlignRight, 0, true);
screen->hLine(_x, _y, _x + _w, color);
screen->hLine(_x, _y + _h, _x + _w , color);
diff --git a/gui/ThemeLayout.h b/gui/ThemeLayout.h
index ba28fae1ac..c4d7e672dd 100644
--- a/gui/ThemeLayout.h
+++ b/gui/ThemeLayout.h
@@ -29,7 +29,7 @@
#ifdef LAYOUT_DEBUG_DIALOG
namespace Graphics {
-class Surface;
+struct Surface;
}
#endif