fixed "wrong font spacing when zoomed"
This commit is contained in:
@@ -79,11 +79,12 @@ void BitmapText::Draw()
|
|||||||
|
|
||||||
for( int i=0; i<m_sText.GetLength(); i++ ) {
|
for( int i=0; i<m_sText.GetLength(); i++ ) {
|
||||||
char c = m_sText[i];
|
char c = m_sText[i];
|
||||||
|
float fCharWidthZoomed = m_fCharWidthsInSourcePixels[c] * GetZoom();
|
||||||
SetState( c );
|
SetState( c );
|
||||||
fX += m_fCharWidthsInSourcePixels[c]/2;
|
fX += fCharWidthZoomed/2;
|
||||||
SetX( fX ); // set X acording to offset
|
SetX( fX ); // set X acording to offset
|
||||||
Sprite::Draw();
|
Sprite::Draw();
|
||||||
fX += m_fCharWidthsInSourcePixels[c]/2;
|
fX += fCharWidthZoomed/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set properties back to original
|
// set properties back to original
|
||||||
|
|||||||
Reference in New Issue
Block a user