From ffae34c5fd0977938bf46b673397b17c58bc99e7 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Mon, 30 Sep 2013 20:02:05 -0400 Subject: [PATCH] - Changed the new default alignment keyword for drawimage from topleft to none in order to allow a potential topleft without image offsets. --- src/g_shared/sbarinfo_commands.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/g_shared/sbarinfo_commands.cpp b/src/g_shared/sbarinfo_commands.cpp index d5ee06d113..449079ab52 100644 --- a/src/g_shared/sbarinfo_commands.cpp +++ b/src/g_shared/sbarinfo_commands.cpp @@ -173,13 +173,18 @@ class CommandDrawImage : public SBarInfoCommandFlowControl GetCoordinates(sc, fullScreenOffsets, imgx, imgy); if(sc.CheckToken(',')) { - sc.MustGetToken(TK_Identifier); - if(sc.Compare("center")) - offset = CENTER; - else if(sc.Compare("centerbottom")) - offset = static_cast (HMIDDLE|BOTTOM); - else if(!sc.Compare("lefttop")) //That's already set - sc.ScriptError("'%s' is not a valid alignment.", sc.String); + // 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); + if(sc.Compare("center")) + offset = CENTER; + else if(sc.Compare("centerbottom")) + offset = static_cast (HMIDDLE|BOTTOM); + else + sc.ScriptError("'%s' is not a valid alignment.", sc.String); + } } if(sc.CheckToken(',')) {