mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-03-27 22:58:12 +05:00
add advanced tooltips, F3+H combo, and handle settings (#1389)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user