diff options
author | Vicent Marti | 2008-07-17 08:36:16 +0000 |
---|---|---|
committer | Vicent Marti | 2008-07-17 08:36:16 +0000 |
commit | 6214815e6eff5b91887e5e1dd4d6463c2000f024 (patch) | |
tree | 7e136cf3024749555c16945964a38466729d3e9c /gui | |
parent | 14c8d5d6c3d70cfa4f3229e3cd7c76771f566f9c (diff) | |
download | scummvm-rg350-6214815e6eff5b91887e5e1dd4d6463c2000f024.tar.gz scummvm-rg350-6214815e6eff5b91887e5e1dd4d6463c2000f024.tar.bz2 scummvm-rg350-6214815e6eff5b91887e5e1dd4d6463c2000f024.zip |
Finished tabs drawing.
Added support for dynamic parameters in the Vector Renderer.
svn-id: r33088
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeDefaultXML.cpp | 10 | ||||
-rw-r--r-- | gui/ThemeRenderer.cpp | 8 | ||||
-rw-r--r-- | gui/ThemeRenderer.h | 2 |
3 files changed, 11 insertions, 9 deletions
diff --git a/gui/ThemeDefaultXML.cpp b/gui/ThemeDefaultXML.cpp index bbd18fce5c..8c8f46d2ec 100644 --- a/gui/ThemeDefaultXML.cpp +++ b/gui/ThemeDefaultXML.cpp @@ -62,13 +62,13 @@ bool ThemeRenderer::loadDefaultXML() { "</drawdata>" "<drawdata id = 'tab_active' cache = false>" - "<text vertical_align = 'center' horizontal_align = 'center' color = '255, 255, 255' />" - "<drawstep func = 'tab' radius = '8' stroke = '2' fill = 'gradient' gradient_start = '206, 121, 99' gradient_end = '173, 40, 8' shadow = 3 />" + "<text vertical_align = 'center' horizontal_align = 'center' color = '0, 0, 0' />" + "<drawstep func = 'tab' radius = '4' stroke = '2' fill = 'gradient' gradient_end = '255, 231, 140' gradient_start = '255, 243, 206' shadow = 3 />" "</drawdata>" "<drawdata id = 'tab_inactive' cache = false>" - "<text vertical_align = 'center' horizontal_align = 'center' color = '255, 255, 255' />" - "<drawstep func = 'tab' radius = '8' stroke = '0' fill = 'foreground' fg_color = '206, 121, 99' shadow = 3 />" + "<text vertical_align = 'center' horizontal_align = 'center' color = '128, 128, 128' />" + "<drawstep func = 'tab' radius = '4' stroke = '0' fill = 'foreground' fg_color = '206, 121, 99' shadow = 3 />" "</drawdata>" "<drawdata id = 'slider_empty' cache = false>" @@ -93,7 +93,7 @@ bool ThemeRenderer::loadDefaultXML() { "</drawdata>" "<drawdata id = 'default_bg' cache = false>" - "<drawstep func = 'roundedsq' radius = 12 stroke = 4 fg_color = '206, 121, 99' fill = 'gradient' gradient_start = '255, 231, 140' gradient_end = '255, 243, 206' shadow = 3 />" + "<drawstep func = 'roundedsq' radius = 12 stroke = 2 fg_color = '255, 255, 255' fill = 'gradient' gradient_start = '255, 231, 140' gradient_end = '255, 243, 206' shadow = 3 />" "</drawdata>" "<drawdata id = 'button_idle' cache = false>" diff --git a/gui/ThemeRenderer.cpp b/gui/ThemeRenderer.cpp index 4b56eba4a2..7b64baba11 100644 --- a/gui/ThemeRenderer.cpp +++ b/gui/ThemeRenderer.cpp @@ -290,7 +290,7 @@ void ThemeRenderer::drawCached(DrawData type, const Common::Rect &r) { _vectorRenderer->blitSurface(_widgets[type]->_surfaceCache, r); } -void ThemeRenderer::drawDD(DrawData type, const Common::Rect &r) { +void ThemeRenderer::drawDD(DrawData type, const Common::Rect &r, uint32 dynamicData) { if (_widgets[type] == 0) return; @@ -299,7 +299,7 @@ void ThemeRenderer::drawDD(DrawData type, const Common::Rect &r) { } else { for (Common::List<Graphics::DrawStep>::const_iterator step = _widgets[type]->_steps.begin(); step != _widgets[type]->_steps.end(); ++step) - _vectorRenderer->drawStep(r, *step); + _vectorRenderer->drawStep(r, *step, dynamicData); } } @@ -473,7 +473,9 @@ void ThemeRenderer::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, if (active >= 0) { Common::Rect tabRect(r.left + active * (tabWidth + tabOffset), r.top, r.left + active * (tabWidth + tabOffset) + tabWidth, r.top + tabHeight); - drawDD(kDDTabActive, tabRect); + const uint16 tabLeft = active * (tabWidth + tabOffset); + const uint16 tabRight = r.right - tabRect.right; + drawDD(kDDTabActive, tabRect, (tabLeft << 16) | (tabRight & 0xFFFF)); drawDDText(kDDTabActive, tabRect, tabs[active]); } } diff --git a/gui/ThemeRenderer.h b/gui/ThemeRenderer.h index e7e320d048..a5fccd8163 100644 --- a/gui/ThemeRenderer.h +++ b/gui/ThemeRenderer.h @@ -261,7 +261,7 @@ protected: bool isWidgetCached(DrawData type, const Common::Rect &r); void drawCached(DrawData type, const Common::Rect &r); - inline void drawDD(DrawData type, const Common::Rect &r); + inline void drawDD(DrawData type, const Common::Rect &r, uint32 dynamicData = 0); inline void drawDDText(DrawData type, const Common::Rect &r, const Common::String &text); inline void debugWidgetPosition(const char *name, const Common::Rect &r); |