aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeEngine.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-05-09 19:00:49 +0300
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit75f9b099dc3e198c7a1750a6e26ac4945719492f (patch)
treea5d3f2f00771456d6bd5402175918debc20a0dc8 /gui/ThemeEngine.cpp
parent38114eb760f842eb3145c9d1af62366cf2fab8ca (diff)
downloadscummvm-rg350-75f9b099dc3e198c7a1750a6e26ac4945719492f.tar.gz
scummvm-rg350-75f9b099dc3e198c7a1750a6e26ac4945719492f.tar.bz2
scummvm-rg350-75f9b099dc3e198c7a1750a6e26ac4945719492f.zip
GUI: Added possibility to specify scale mode for AlphaBitmaps
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) {