mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
Use rich item tooltips in bank window slots
This commit is contained in:
parent
e34357a0a4
commit
95ac97a41c
1 changed files with 8 additions and 4 deletions
|
|
@ -11094,10 +11094,14 @@ void GameScreen::renderBankWindow(game::GameHandler& gameHandler) {
|
||||||
|
|
||||||
// Tooltip
|
// Tooltip
|
||||||
if (ImGui::IsItemHovered() && !isHolding) {
|
if (ImGui::IsItemHovered() && !isHolding) {
|
||||||
ImGui::BeginTooltip();
|
auto* info = gameHandler.getItemInfo(item.itemId);
|
||||||
ImGui::TextColored(qc, "%s", item.name.c_str());
|
if (info && info->valid)
|
||||||
if (item.stackCount > 1) ImGui::Text("Count: %u", item.stackCount);
|
inventoryScreen.renderItemTooltip(*info);
|
||||||
ImGui::EndTooltip();
|
else {
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::TextColored(qc, "%s", item.name.c_str());
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue