aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorVicent Marti2008-11-10 11:24:55 +0000
committerVicent Marti2008-11-10 11:24:55 +0000
commitb98f89c7f0c6ada45cb33dd650f1502c09fe6aa8 (patch)
treee33b48cbfb98bc453f8f1c229649e48b0e3d9d15 /graphics
parent631c679e404c895eecd50cdba0c40a16a539106e (diff)
downloadscummvm-rg350-b98f89c7f0c6ada45cb33dd650f1502c09fe6aa8.tar.gz
scummvm-rg350-b98f89c7f0c6ada45cb33dd650f1502c09fe6aa8.tar.bz2
scummvm-rg350-b98f89c7f0c6ada45cb33dd650f1502c09fe6aa8.zip
Merged GUI::Theme and Gui::ThemeEngine into the same class, GUI::ThemeEngine.
Massive cleanup. svn-id: r34983
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRenderer.h6
-rw-r--r--graphics/VectorRendererSpec.cpp12
-rw-r--r--graphics/VectorRendererSpec.h6
3 files changed, 12 insertions, 12 deletions
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index f072e5d01e..4ccd6845b9 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -507,8 +507,8 @@ public:
* method.
*/
virtual void drawString(const Graphics::Font *font, const Common::String &text,
- const Common::Rect &area, GUI::Theme::TextAlign alignH,
- GUI::Theme::TextAlignVertical alignV, int deltax, bool useEllipsis) = 0;
+ const Common::Rect &area, GUI::ThemeEngine::TextAlign alignH,
+ GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool useEllipsis) = 0;
/**
* Allows to temporarily enable/disable all shadows drawing.
@@ -549,7 +549,7 @@ public:
* Applies a whole-screen shading effect, used before opening a new dialog.
* Currently supports screen dimmings and luminance (b&w).
*/
- virtual void applyScreenShading(GUI::Theme::ShadingStyle) = 0;
+ virtual void applyScreenShading(GUI::ThemeEngine::ShadingStyle) = 0;
protected:
Surface *_activeSurface; /**< Pointer to the surface currently being drawn */
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index 5f299814e4..675acd7ad3 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -354,7 +354,7 @@ blitAlphaBitmap(const Graphics::Surface *source, const Common::Rect &r) {
template <typename PixelType, typename PixelFormat>
void VectorRendererSpec<PixelType, PixelFormat>::
-applyScreenShading(GUI::Theme::ShadingStyle shadingStyle) {
+applyScreenShading(GUI::ThemeEngine::ShadingStyle shadingStyle) {
int pixels = _activeSurface->w * _activeSurface->h;
PixelType *ptr = (PixelType *)_activeSurface->getBasePtr(0, 0);
uint8 r, g, b;
@@ -365,7 +365,7 @@ applyScreenShading(GUI::Theme::ShadingStyle shadingStyle) {
(1 << PixelFormat::kRedShift) |
(1 << PixelFormat::kBlueShift)) >> 1;
- if (shadingStyle == GUI::Theme::kShadingDim) {
+ if (shadingStyle == GUI::ThemeEngine::kShadingDim) {
int n = (pixels + 7) >> 3;
switch (pixels % 8) {
@@ -381,7 +381,7 @@ applyScreenShading(GUI::Theme::ShadingStyle shadingStyle) {
} while (--n > 0);
}
- } else if (shadingStyle == GUI::Theme::kShadingLuminance) {
+ } else if (shadingStyle == GUI::ThemeEngine::kShadingLuminance) {
while (pixels--) {
colorToRGB<PixelFormat>(*ptr, r, g, b);
lum = (r >> 2) + (g >> 1) + (b >> 3);
@@ -449,16 +449,16 @@ colorFill(PixelType *first, PixelType *last, PixelType color) {
template <typename PixelType, typename PixelFormat>
void VectorRendererSpec<PixelType, PixelFormat>::
drawString(const Graphics::Font *font, const Common::String &text, const Common::Rect &area,
- GUI::Theme::TextAlign alignH, GUI::Theme::TextAlignVertical alignV, int deltax, bool ellipsis) {
+ GUI::ThemeEngine::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool ellipsis) {
int offset = area.top;
if (font->getFontHeight() < area.height()) {
switch (alignV) {
- case GUI::Theme::kTextAlignVCenter:
+ case GUI::ThemeEngine::kTextAlignVCenter:
offset = area.top + ((area.height() - font->getFontHeight()) >> 1);
break;
- case GUI::Theme::kTextAlignVBottom:
+ case GUI::ThemeEngine::kTextAlignVBottom:
offset = area.bottom - font->getFontHeight();
break;
default:
diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h
index c0d3b3e00f..5b4ebf38e7 100644
--- a/graphics/VectorRendererSpec.h
+++ b/graphics/VectorRendererSpec.h
@@ -68,8 +68,8 @@ public:
drawBevelSquareAlg(x, y, w, h, bevel, _bevelColor, _fgColor, Base::_fillMode != kFillDisabled);
}
void drawString(const Graphics::Font *font, const Common::String &text,
- const Common::Rect &area, GUI::Theme::TextAlign alignH,
- GUI::Theme::TextAlignVertical alignV, int deltax, bool elipsis);
+ const Common::Rect &area, GUI::ThemeEngine::TextAlign alignH,
+ GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool elipsis);
void setFgColor(uint8 r, uint8 g, uint8 b) { _fgColor = RGBToColor<PixelFormat>(r, g, b); }
void setBgColor(uint8 r, uint8 g, uint8 b) { _bgColor = RGBToColor<PixelFormat>(r, g, b); }
@@ -84,7 +84,7 @@ public:
void blitSubSurface(const Graphics::Surface *source, const Common::Rect &r);
void blitAlphaBitmap(const Graphics::Surface *source, const Common::Rect &r);
- void applyScreenShading(GUI::Theme::ShadingStyle shadingStyle);
+ void applyScreenShading(GUI::ThemeEngine::ShadingStyle shadingStyle);
protected: