Fix text showing only the first character.
This commit is contained in:
@@ -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 = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user