aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorEugene Sandulenko2014-05-05 00:52:56 +0300
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit4474ccf8144563c4bacbb060c943c0f68e317cea (patch)
treea3e31d55b72be1a0717db5ba3c97020631f0f50f /gui
parentf0c52096f3e9215cb584b3862f2cd4b9632761d5 (diff)
downloadscummvm-rg350-4474ccf8144563c4bacbb060c943c0f68e317cea.tar.gz
scummvm-rg350-4474ccf8144563c4bacbb060c943c0f68e317cea.tar.bz2
scummvm-rg350-4474ccf8144563c4bacbb060c943c0f68e317cea.zip
GUI: Implemented alphabitmap autoscale
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeEngine.cpp2
-rw-r--r--gui/ThemeParser.cpp5
-rw-r--r--gui/ThemeParser.h1
3 files changed, 7 insertions, 1 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 26729b916f..545b9b5c56 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -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, false);
_engine->addDirtyRect(_area);
}
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 8d917f29e0..ca8b2631a5 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -468,6 +468,11 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst
drawstep->blitAlphaSrc = _theme->getAlphaBitmap(stepNode->values["file"]);
+ if (stepNode->values.contains("autoscale") && stepNode->values["autoscale"] == "true")
+ drawstep->autoscale = true;
+ else
+ drawstep->autoscale = false;
+
if (!drawstep->blitAlphaSrc)
return parserError("The given filename hasn't been loaded into the GUI.");
}
diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h
index 14305af80d..155731467f 100644
--- a/gui/ThemeParser.h
+++ b/gui/ThemeParser.h
@@ -146,6 +146,7 @@ protected:
XML_PROP(padding, false)
XML_PROP(orientation, false)
XML_PROP(file, false)
+ XML_PROP(autoscale, false)
KEY_END()
XML_KEY(text)