[Scummvm-cvs-logs] SF.net SVN: scummvm:[48746] scummvm/trunk/engines/sci/graphics/menu.cpp
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Tue Apr 20 17:10:28 CEST 2010
Revision: 48746
http://scummvm.svn.sourceforge.net/scummvm/?rev=48746&view=rev
Author: m_kiewitz
Date: 2010-04-20 15:10:27 +0000 (Tue, 20 Apr 2010)
Log Message:
-----------
SCI: remove lone spaces at the end of right aligned menu items. fixes "wrongly" aligned menu items in some games
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/menu.cpp
Modified: scummvm/trunk/engines/sci/graphics/menu.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/menu.cpp 2010-04-20 11:47:06 UTC (rev 48745)
+++ scummvm/trunk/engines/sci/graphics/menu.cpp 2010-04-20 15:10:27 UTC (rev 48746)
@@ -218,6 +218,9 @@
if (tagPos && tagPos >= rightAlignedPos)
tempPos = tagPos;
itemEntry->textRightAligned = Common::String(content.c_str() + rightAlignedPos, tempPos - rightAlignedPos);
+ // Remove ending space, if there is one. Strangely sometimes there are lone spaces at the end in some games
+ if (itemEntry->textRightAligned.hasSuffix(" "))
+ itemEntry->textRightAligned.deleteLastChar();
// - and + are used sometimes for volume control
if (itemEntry->textRightAligned == "-") {
itemEntry->keyPress = '-';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list