aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/ThemeEngine.cpp')
-rw-r--r--gui/ThemeEngine.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 26729b916f..57c2e5d870 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -172,14 +172,14 @@ protected:
class ThemeItemABitmap : public ThemeItem {
public:
- ThemeItemABitmap(ThemeEngine *engine, const Common::Rect &area, Graphics::TransparentSurface *bitmap, bool alpha) :
- ThemeItem(engine, area), _bitmap(bitmap), _alpha(alpha) {}
+ ThemeItemABitmap(ThemeEngine *engine, const Common::Rect &area, Graphics::TransparentSurface *bitmap, ThemeEngine::AutoScaleMode autoscale) :
+ ThemeItem(engine, area), _bitmap(bitmap), _autoscale(autoscale) {}
void drawSelf(bool draw, bool restore);
protected:
Graphics::TransparentSurface *_bitmap;
- bool _alpha;
+ ThemeEngine::AutoScaleMode _autoscale;
};
class ThemeItemBitmapClip : public ThemeItem {
@@ -334,7 +334,7 @@ void ThemeItemABitmap::drawSelf(bool draw, bool restore) {
_engine->restoreBackground(_area);
if (draw)
- _engine->renderer()->blitAlphaBitmap(_bitmap, _area);
+ _engine->renderer()->blitAlphaBitmap(_bitmap, _area, _autoscale);
_engine->addDirtyRect(_area);
}
@@ -1114,12 +1114,12 @@ void ThemeEngine::queueBitmap(const Graphics::Surface *bitmap, const Common::Rec
}
}
-void ThemeEngine::queueABitmap(Graphics::TransparentSurface *bitmap, const Common::Rect &r, bool alpha) {
+void ThemeEngine::queueABitmap(Graphics::TransparentSurface *bitmap, const Common::Rect &r, AutoScaleMode autoscale) {
Common::Rect area = r;
area.clip(_screen.w, _screen.h);
- ThemeItemABitmap *q = new ThemeItemABitmap(this, area, bitmap, alpha);
+ ThemeItemABitmap *q = new ThemeItemABitmap(this, area, bitmap, autoscale);
if (_buffering) {
_screenQueue.push_back(q);
@@ -1517,11 +1517,11 @@ void ThemeEngine::drawSurface(const Common::Rect &r, const Graphics::Surface &su
queueBitmap(&surface, r, themeTrans);
}
-void ThemeEngine::drawASurface(const Common::Rect &r, Graphics::TransparentSurface &surface, WidgetStateInfo state, int alpha, bool themeTrans) {
+void ThemeEngine::drawASurface(const Common::Rect &r, Graphics::TransparentSurface &surface, AutoScaleMode autoscale) {
if (!ready())
return;
- queueABitmap(&surface, r, themeTrans);
+ queueABitmap(&surface, r, autoscale);
}
void ThemeEngine::drawSurfaceClip(const Common::Rect &r, const Common::Rect &clip, const Graphics::Surface &surface, WidgetStateInfo state, int alpha, bool themeTrans) {