mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-16 18:05:22 +02:00
Show itemstring as tooltip if no item description
This commit is contained in:
@@ -2394,6 +2394,9 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase,
|
|||||||
utf8_to_wide(item.getDefinition(m_client->idef()).description);
|
utf8_to_wide(item.getDefinition(m_client->idef()).description);
|
||||||
else
|
else
|
||||||
tooltip_text = utf8_to_wide(desc);
|
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"") {
|
if (tooltip_text != L"") {
|
||||||
std::vector<std::wstring> tt_rows = str_split(tooltip_text, L'\n');
|
std::vector<std::wstring> tt_rows = str_split(tooltip_text, L'\n');
|
||||||
|
Reference in New Issue
Block a user