GUI: Implemented more modes to autoscale
This commit is contained in:
parent
4474ccf814
commit
ec7312ac13
5 changed files with 32 additions and 11 deletions
|
@ -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.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue