1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Fix 6th line of infotext being cut off in half (#11456)

This commit is contained in:
Wuzzy 2021-08-23 20:13:17 +00:00 committed by GitHub
parent eea488ed75
commit 63e8224636
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View file

@ -71,11 +71,14 @@ void GameUI::init()
chat_font_size, FM_Unspecified));
}
// At the middle of the screen
// Object infos are shown in this
// Infotext of nodes and objects.
// If in debug mode, object debug infos shown here, too.
// Located on the left on the screen, below chat.
u32 chat_font_height = m_guitext_chat->getActiveFont()->getDimension(L"Ay").Height;
m_guitext_info = gui::StaticText::add(guienv, L"",
core::rect<s32>(0, 0, 400, g_fontengine->getTextHeight() * 5 + 5) +
// Size is limited; text will be truncated after 6 lines.
core::rect<s32>(0, 0, 400, g_fontengine->getTextHeight() * 6) +
v2s32(100, chat_font_height *
(g_settings->getU16("recent_chat_messages") + 3)),
false, true, guiroot);