GUI: Implemented more modes to autoscale

This commit is contained in:
Eugene Sandulenko 2014-05-05 21:36:16 +03:00 committed by Alexander Tkachev
parent 4474ccf814
commit ec7312ac13
5 changed files with 32 additions and 11 deletions

View file

@ -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.");