From 62833a3fd31f8411ef052c81057a7cf49e8beafc Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Fri, 23 Apr 2010 21:18:16 +0000 Subject: 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 --- engines/sci/graphics/text16.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 (textHeight, _ports->_curPort->fontHeight); textWidth += _font->getCharWidth(curChar); } -- cgit v1.2.3