- Changed the new default alignment keyword for drawimage from topleft to none in order to allow a potential topleft without image offsets.

This commit is contained in:
Braden Obrzut 2013-09-30 20:02:05 -04:00
parent 658b4f7e0f
commit ffae34c5fd

View file

@ -172,15 +172,20 @@ class CommandDrawImage : public SBarInfoCommandFlowControl
sc.MustGetToken(','); sc.MustGetToken(',');
GetCoordinates(sc, fullScreenOffsets, imgx, imgy); GetCoordinates(sc, fullScreenOffsets, imgx, imgy);
if(sc.CheckToken(',')) if(sc.CheckToken(','))
{
// Use none instead of topleft in case we decide we want to use
// alignments to remove the offset from images.
if(!sc.CheckToken(TK_None))
{ {
sc.MustGetToken(TK_Identifier); sc.MustGetToken(TK_Identifier);
if(sc.Compare("center")) if(sc.Compare("center"))
offset = CENTER; offset = CENTER;
else if(sc.Compare("centerbottom")) else if(sc.Compare("centerbottom"))
offset = static_cast<Offset> (HMIDDLE|BOTTOM); offset = static_cast<Offset> (HMIDDLE|BOTTOM);
else if(!sc.Compare("lefttop")) //That's already set else
sc.ScriptError("'%s' is not a valid alignment.", sc.String); sc.ScriptError("'%s' is not a valid alignment.", sc.String);
} }
}
if(sc.CheckToken(',')) if(sc.CheckToken(','))
{ {
sc.MustGetToken(TK_IntConst); sc.MustGetToken(TK_IntConst);