From 127465b0eb2fedba5ded9ca9500f90f8900e5a9c Mon Sep 17 00:00:00 2001 From: Sylvessa <225480449+sylvessa@users.noreply.github.com> Date: Mon, 23 Mar 2026 17:54:46 -0500 Subject: add advanced tooltips, F3+H combo, and handle settings (#1389) --- Minecraft.World/ItemInstance.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'Minecraft.World') diff --git a/Minecraft.World/ItemInstance.cpp b/Minecraft.World/ItemInstance.cpp index b4f9b2ad..e4af60c6 100644 --- a/Minecraft.World/ItemInstance.cpp +++ b/Minecraft.World/ItemInstance.cpp @@ -562,34 +562,27 @@ vector *ItemInstance::getHoverText(shared_ptr player, bool a title.italics = true; } - // 4J: This is for showing aux values, not useful in console version - /* if (advanced) { wstring suffix = L""; - if (title.length() > 0) + if (title.text.length() > 0) { - title += L" ("; + title.text += L" ("; suffix = L")"; } + wchar_t buf[64]; if (isStackedByData()) - { - title += String.format("#%04d/%d%s", id, auxValue, suffix); - } + swprintf_s(buf, 64, L"#%04d/%d%s", id, auxValue, suffix.c_str()); else - { - title += String.format("#%04d%s", id, suffix); - } + swprintf_s(buf, 64, L"#%04d%s", id, suffix.c_str()); + title.text += buf; } else if (!hasCustomHoverName() && id == Item::map_Id) - */ - - /*if (!hasCustomHoverName() && id == Item::map_Id) { title.text += L" #" + std::to_wstring(auxValue); - }*/ + } lines->push_back(title); @@ -673,7 +666,7 @@ vector *ItemInstance::getHoverText(shared_ptr player, bool a { if (isDamaged()) { - wstring damageStr = L"Durability: LOCALISE " + std::to_wstring((getMaxDamage()) - getDamageValue()) + L" / " + std::to_wstring(getMaxDamage()); + wstring damageStr = L"Durability: " + std::to_wstring((getMaxDamage()) - getDamageValue()) + L" / " + std::to_wstring(getMaxDamage()); lines->push_back(HtmlString(damageStr)); } } -- cgit v1.2.3