From e34357a0a4d8c37bc6d2146d8f7edf0631f4718c Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 11 Mar 2026 21:14:27 -0700 Subject: [PATCH] Use rich item tooltips in mail attachments and guild bank slots --- src/ui/game_screen.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 983f2cf9..19219f28 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -10802,12 +10802,8 @@ void GameScreen::renderMailWindow(game::GameHandler& gameHandler) { } ImGui::InvisibleButton("##mailatt", ImVec2(MAIL_SLOT, MAIL_SLOT)); - if (ImGui::IsItemHovered()) { - ImGui::BeginTooltip(); - ImGui::TextColored(qc, "%s", name.c_str()); - if (att.stackCount > 1) ImGui::Text("Count: %u", att.stackCount); - ImGui::EndTooltip(); - } + if (ImGui::IsItemHovered() && info && info->valid) + inventoryScreen.renderItemTooltip(*info); ImGui::SameLine(); ImGui::TextColored(qc, "%s", name.c_str()); ImGui::SameLine(); @@ -11272,12 +11268,8 @@ void GameScreen::renderGuildBankWindow(game::GameHandler& gameHandler) { if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) { gameHandler.guildBankWithdrawItem(activeTab, item.slotId, 0xFF, 0); } - if (ImGui::IsItemHovered()) { - ImGui::BeginTooltip(); - ImGui::TextColored(qc, "%s", name.c_str()); - if (item.stackCount > 1) ImGui::Text("Count: %u", item.stackCount); - ImGui::EndTooltip(); - } + if (ImGui::IsItemHovered() && info && info->valid) + inventoryScreen.renderItemTooltip(*info); } ImGui::PopID(); }