Text alignment alterations

This was SVN commit r1119.
This commit is contained in:
Ykkrosh
2004-09-04 20:35:12 +00:00
parent 933f51d48b
commit 3b15f3f1e4
5 changed files with 59 additions and 22 deletions
+6 -1
View File
@@ -33,7 +33,8 @@ void CGUIString::SFeedback::Reset()
void CGUIString::GenerateTextCall(SFeedback &Feedback,
const CStr& DefaultFont,
const int &from, const int &to,
const int &from, const int &to,
const bool FirstLine,
const IGUIObject *pObject) const
{
// Reset width and height, because they will be determined with incrementation
@@ -199,6 +200,10 @@ void CGUIString::GenerateTextCall(SFeedback &Feedback,
int cx, cy;
CFont font (TextCall.m_Font);
font.CalculateStringSize(TextCall.m_String, cx, cy);
// For anything other than the first line, the line spacing
// needs to be considered rather than just the height of the text
if (! FirstLine)
cy = font.GetLineSpacing();
size.cx = (float)cx;
size.cy = (float)cy;