Use rich item tooltips in mail attachments and guild bank slots

This commit is contained in:
Kelsi 2026-03-11 21:14:27 -07:00
parent 4394f93a17
commit e34357a0a4

View file

@ -10802,12 +10802,8 @@ void GameScreen::renderMailWindow(game::GameHandler& gameHandler) {
} }
ImGui::InvisibleButton("##mailatt", ImVec2(MAIL_SLOT, MAIL_SLOT)); ImGui::InvisibleButton("##mailatt", ImVec2(MAIL_SLOT, MAIL_SLOT));
if (ImGui::IsItemHovered()) { if (ImGui::IsItemHovered() && info && info->valid)
ImGui::BeginTooltip(); inventoryScreen.renderItemTooltip(*info);
ImGui::TextColored(qc, "%s", name.c_str());
if (att.stackCount > 1) ImGui::Text("Count: %u", att.stackCount);
ImGui::EndTooltip();
}
ImGui::SameLine(); ImGui::SameLine();
ImGui::TextColored(qc, "%s", name.c_str()); ImGui::TextColored(qc, "%s", name.c_str());
ImGui::SameLine(); ImGui::SameLine();
@ -11272,12 +11268,8 @@ void GameScreen::renderGuildBankWindow(game::GameHandler& gameHandler) {
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) { if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
gameHandler.guildBankWithdrawItem(activeTab, item.slotId, 0xFF, 0); gameHandler.guildBankWithdrawItem(activeTab, item.slotId, 0xFF, 0);
} }
if (ImGui::IsItemHovered()) { if (ImGui::IsItemHovered() && info && info->valid)
ImGui::BeginTooltip(); inventoryScreen.renderItemTooltip(*info);
ImGui::TextColored(qc, "%s", name.c_str());
if (item.stackCount > 1) ImGui::Text("Count: %u", item.stackCount);
ImGui::EndTooltip();
}
} }
ImGui::PopID(); ImGui::PopID();
} }