diff options
author | Eugene Sandulenko | 2014-05-05 21:36:16 +0300 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | ec7312ac13ce19f64b2b453b43e2c37235dcbe7a (patch) | |
tree | 8be300bb5049397d5d70732ed0be46dea2f269bc /gui | |
parent | 4474ccf8144563c4bacbb060c943c0f68e317cea (diff) | |
download | scummvm-rg350-ec7312ac13ce19f64b2b453b43e2c37235dcbe7a.tar.gz scummvm-rg350-ec7312ac13ce19f64b2b453b43e2c37235dcbe7a.tar.bz2 scummvm-rg350-ec7312ac13ce19f64b2b453b43e2c37235dcbe7a.zip |
GUI: Implemented more modes to autoscale
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeEngine.cpp | 2 | ||||
-rw-r--r-- | gui/ThemeParser.cpp | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 545b9b5c56..26729b916f 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, false); + _engine->renderer()->blitAlphaBitmap(_bitmap, _area); _engine->addDirtyRect(_area); } diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp index ca8b2631a5..226281122f 100644 --- a/gui/ThemeParser.cpp +++ b/gui/ThemeParser.cpp @@ -468,10 +468,13 @@ 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 (stepNode->values.contains("autoscale")) + if (stepNode->values["autoscale"] == "true" || stepNode->values["autoscale"] == "stretch") + drawstep->autoscale = Graphics::DrawStep::kAutoScaleStretch; + else if (stepNode->values["autoscale"] == "fit") + drawstep->autoscale = Graphics::DrawStep::kAutoScaleFit; + else + drawstep->autoscale = Graphics::DrawStep::kAutoScaleNone; if (!drawstep->blitAlphaSrc) return parserError("The given filename hasn't been loaded into the GUI."); |