aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2017-02-24 04:17:14 +0100
committerSmallJoker <mk939@ymail.com>2017-03-18 12:36:28 +0100
commit2cc518dcaffd345c498f671354b3dd504f2f4195 (patch)
tree68fe5e13eb2e439363c0cb5af062964e1fe30137
parent9f4916a4528011b820c8bcbb3160bebda0cd2c2a (diff)
downloadminetest-2cc518dcaffd345c498f671354b3dd504f2f4195.tar.gz
minetest-2cc518dcaffd345c498f671354b3dd504f2f4195.tar.bz2
minetest-2cc518dcaffd345c498f671354b3dd504f2f4195.zip
Show itemstring as tooltip if no item description
-rw-r--r--src/guiFormSpecMenu.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index 19cac6241..330124fe1 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -2394,6 +2394,9 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase,
utf8_to_wide(item.getDefinition(m_client->idef()).description);
else
tooltip_text = utf8_to_wide(desc);
+ // Show itemstring as fallback for easier debugging
+ if (!item.name.empty() && tooltip_text.empty())
+ tooltip_text = utf8_to_wide(item.name);
}
if (tooltip_text != L"") {
std::vector<std::wstring> tt_rows = str_split(tooltip_text, L'\n');