Use rich item tooltips in bank window slots

This commit is contained in:
Kelsi 2026-03-11 21:15:41 -07:00
parent e34357a0a4
commit 95ac97a41c

View file

@ -11094,12 +11094,16 @@ void GameScreen::renderBankWindow(game::GameHandler& gameHandler) {
// Tooltip // Tooltip
if (ImGui::IsItemHovered() && !isHolding) { if (ImGui::IsItemHovered() && !isHolding) {
auto* info = gameHandler.getItemInfo(item.itemId);
if (info && info->valid)
inventoryScreen.renderItemTooltip(*info);
else {
ImGui::BeginTooltip(); ImGui::BeginTooltip();
ImGui::TextColored(qc, "%s", item.name.c_str()); ImGui::TextColored(qc, "%s", item.name.c_str());
if (item.stackCount > 1) ImGui::Text("Count: %u", item.stackCount);
ImGui::EndTooltip(); ImGui::EndTooltip();
} }
} }
}
}; };
// Main bank slots (24 for Classic, 28 for TBC/WotLK) // Main bank slots (24 for Classic, 28 for TBC/WotLK)