File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -2100,7 +2100,9 @@ Some of the values in the key-value store are handled specially:
2100
2100
* `formspec`: Defines an inventory menu that is opened with the
2101
2101
'place/use' key. Only works if no `on_rightclick` was
2102
2102
defined for the node. See also [Formspec].
2103
- * `infotext`: Text shown on the screen when the node is pointed at
2103
+ * `infotext`: Text shown on the screen when the node is pointed at.
2104
+ Line-breaks will be applied automatically.
2105
+ If the infotext is very long, it will be truncated.
2104
2106
2105
2107
Example:
2106
2108
@@ -7189,7 +7191,7 @@ Player properties need to be saved manually.
7189
7191
-- Default: false
7190
7192
7191
7193
infotext = "",
7192
- -- By default empty, text to be shown when pointed at object
7194
+ -- Same as infotext for nodes. Empty by default
7193
7195
7194
7196
static_save = true,
7195
7197
-- If false, never save this object statically. It will simply be
Original file line number Diff line number Diff line change @@ -71,11 +71,14 @@ void GameUI::init()
71
71
chat_font_size, FM_Unspecified));
72
72
}
73
73
74
- // At the middle of the screen
75
- // Object infos are shown in this
74
+
75
+ // Infotext of nodes and objects.
76
+ // If in debug mode, object debug infos shown here, too.
77
+ // Located on the left on the screen, below chat.
76
78
u32 chat_font_height = m_guitext_chat->getActiveFont ()->getDimension (L" Ay" ).Height ;
77
79
m_guitext_info = gui::StaticText::add (guienv, L" " ,
78
- core::rect<s32>(0 , 0 , 400 , g_fontengine->getTextHeight () * 5 + 5 ) +
80
+ // Size is limited; text will be truncated after 6 lines.
81
+ core::rect<s32>(0 , 0 , 400 , g_fontengine->getTextHeight () * 6 ) +
79
82
v2s32 (100 , chat_font_height *
80
83
(g_settings->getU16 (" recent_chat_messages" ) + 3 )),
81
84
false , true , guiroot);
You can’t perform that action at this time.
0 commit comments