aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2010-04-23 21:18:16 +0000
committerMartin Kiewitz2010-04-23 21:18:16 +0000
commit62833a3fd31f8411ef052c81057a7cf49e8beafc (patch)
tree073a2832dd1bf54e2473c10f520f877eb6e9eef7 /engines/sci
parent35b21a94ff5155afa5f72fe7615143dff9a0bbb2 (diff)
downloadscummvm-rg350-62833a3fd31f8411ef052c81057a7cf49e8beafc.tar.gz
scummvm-rg350-62833a3fd31f8411ef052c81057a7cf49e8beafc.tar.bz2
scummvm-rg350-62833a3fd31f8411ef052c81057a7cf49e8beafc.zip
SCI: text16 ::Width() doesn't add ending spaces to the width anymore, sierra sci also doesn't do this - fixes windows being too large sometimes
svn-id: r48778
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/text16.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index 74ffe4f8c1..9fa5a3b81a 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -267,6 +267,9 @@ void GfxText16::Width(const char *text, int16 from, int16 len, GuiResourceId org
break;
}
default:
+ // if last character is a space, don't add it to textWidth
+ if ((curChar == ' ') && (!len))
+ break;
textHeight = MAX<int16> (textHeight, _ports->_curPort->fontHeight);
textWidth += _font->getCharWidth(curChar);
}