add advanced tooltips, F3+H combo, and handle settings (#1389)

This commit is contained in:
Sylvessa
2026-03-23 17:54:46 -05:00
committed by GitHub
parent 77433dbd86
commit 127465b0eb
8 changed files with 68 additions and 26 deletions

View File

@@ -562,34 +562,27 @@ vector<HtmlString> *ItemInstance::getHoverText(shared_ptr<Player> 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<HtmlString> *ItemInstance::getHoverText(shared_ptr<Player> 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));
}
}