Fix text showing only the first character.

This commit is contained in:
Steve Checkoway
2007-08-15 06:43:11 +00:00
parent 8d8e707347
commit a9f12e1788
+2 -2
View File
@@ -267,7 +267,7 @@ void ColorBitmapText::SetText( const RString& _sText, const RString& _sAlternate
continue; continue;
} }
char curChar = m_sText[0]; char curChar = m_sText[i];
int iCharLen = m_pFont->GetLineWidthInSourcePixels( wstring(1, curChar) ); int iCharLen = m_pFont->GetLineWidthInSourcePixels( wstring(1, curChar) );
switch( curChar ) switch( curChar )
@@ -287,7 +287,7 @@ void ColorBitmapText::SetText( const RString& _sText, const RString& _sAlternate
SimpleAddLine( sCurrentLine, iLineWidth ); SimpleAddLine( sCurrentLine, iLineWidth );
if( iWordWidth > 0 ) if( iWordWidth > 0 )
iLineWidth = iWordWidth + //Add the width of a space iLineWidth = iWordWidth + //Add the width of a space
m_pFont->GetLineWidthInSourcePixels( RStringToWstring( " " ) ); m_pFont->GetLineWidthInSourcePixels( L" " );
sCurrentLine = sCurrentWord + " "; sCurrentLine = sCurrentWord + " ";
iWordWidth = 0; iWordWidth = 0;
sCurrentWord = ""; sCurrentWord = "";