summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2021-08-23 20:13:17 +0000
committerGitHub <noreply@github.com>2021-08-23 22:13:17 +0200
commit63e8224636cec3ede1dbb8b78954a8e3a82407a5 (patch)
tree873cb7e9750e828e91cf6b61051abd4a478ad787 /src
parenteea488ed75c9a158a398a971a16d5f7226b02f35 (diff)
downloadminetest-63e8224636cec3ede1dbb8b78954a8e3a82407a5.tar.gz
minetest-63e8224636cec3ede1dbb8b78954a8e3a82407a5.tar.bz2
minetest-63e8224636cec3ede1dbb8b78954a8e3a82407a5.zip
Fix 6th line of infotext being cut off in half (#11456)
Diffstat (limited to 'src')
-rw-r--r--src/client/gameui.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp
index 028052fe6..9b77cf6ff 100644
--- a/src/client/gameui.cpp
+++ b/src/client/gameui.cpp
@@ -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);