GRAPHICS: Restore layout debugging capabilities
This commit is contained in:
parent
c7ad2155fc
commit
a612b0a173
3 changed files with 10 additions and 3 deletions
|
@ -1265,8 +1265,15 @@ void ThemeEngine::updateScreen(bool render) {
|
||||||
_screenQueue.clear();
|
_screenQueue.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (render)
|
if (render) {
|
||||||
|
#ifdef LAYOUT_DEBUG_DIALOG
|
||||||
|
_vectorRenderer->fillSurface();
|
||||||
|
_themeEval->debugDraw(&_screen, _font);
|
||||||
|
_vectorRenderer->copyWholeFrame(_system);
|
||||||
|
#else
|
||||||
renderDirtyScreen();
|
renderDirtyScreen();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThemeEngine::addDirtyRect(Common::Rect r) {
|
void ThemeEngine::addDirtyRect(Common::Rect r) {
|
||||||
|
|
|
@ -123,7 +123,7 @@ int16 ThemeLayoutStacked::getParentHeight() {
|
||||||
|
|
||||||
#ifdef LAYOUT_DEBUG_DIALOG
|
#ifdef LAYOUT_DEBUG_DIALOG
|
||||||
void ThemeLayout::debugDraw(Graphics::Surface *screen, const Graphics::Font *font) {
|
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);
|
font->drawString(screen, getName(), _x, _y, _w, color, Graphics::kTextAlignRight, 0, true);
|
||||||
screen->hLine(_x, _y, _x + _w, color);
|
screen->hLine(_x, _y, _x + _w, color);
|
||||||
screen->hLine(_x, _y + _h, _x + _w , color);
|
screen->hLine(_x, _y + _h, _x + _w , color);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#ifdef LAYOUT_DEBUG_DIALOG
|
#ifdef LAYOUT_DEBUG_DIALOG
|
||||||
namespace Graphics {
|
namespace Graphics {
|
||||||
class Surface;
|
struct Surface;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue