feat: add Shift+hover item comparison in vendor window

Extend renderItemTooltip(ItemQueryResponseData) to accept an optional
Inventory* parameter. When Shift is held and an equipped item in the
same slot exists, show: equipped item name, item level diff (▲/▼/=),
and stat diffs for Armor/Str/Agi/Sta/Int/Spi. Pass the player's
inventory from the vendor window hover handler to enable this.
This commit is contained in:
Kelsi 2026-03-12 05:20:44 -07:00
parent 5827a8fcdd
commit f5d67c3c7f
3 changed files with 45 additions and 3 deletions

View file

@ -10173,7 +10173,7 @@ void GameScreen::renderVendorWindow(game::GameHandler& gameHandler) {
ImVec4 qc = InventoryScreen::getQualityColor(static_cast<game::ItemQuality>(info->quality));
ImGui::TextColored(qc, "%s", info->name.c_str());
if (ImGui::IsItemHovered()) {
inventoryScreen.renderItemTooltip(*info);
inventoryScreen.renderItemTooltip(*info, &gameHandler.getInventory());
}
// Shift-click: insert item link into chat
if (ImGui::IsItemClicked() && ImGui::GetIO().KeyShift) {