mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
IGUIFont / CGUITTFont code cleanups (#15581)
This commit is contained in:
parent
0bfd9bc09e
commit
c49ff76955
12 changed files with 135 additions and 626 deletions
|
@ -74,7 +74,7 @@ void StaticText::draw()
|
|||
updateText();
|
||||
|
||||
core::rect<s32> r = frameRect;
|
||||
s32 height_line = font->getDimension(L"A").Height + font->getKerningHeight();
|
||||
s32 height_line = font->getDimension(L"A").Height + font->getKerning(L'A').Y;
|
||||
s32 height_total = height_line * BrokenText.size();
|
||||
if (VAlign == EGUIA_CENTER && WordWrap)
|
||||
{
|
||||
|
@ -546,7 +546,7 @@ s32 StaticText::getTextHeight() const
|
|||
return 0;
|
||||
|
||||
if (WordWrap) {
|
||||
s32 height = font->getDimension(L"A").Height + font->getKerningHeight();
|
||||
s32 height = font->getDimension(L"A").Height + font->getKerning(L'A').Y;
|
||||
return height * BrokenText.size();
|
||||
}
|
||||
// There may be intentional new lines without WordWrap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue