mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
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:
parent
5827a8fcdd
commit
f5d67c3c7f
3 changed files with 45 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue