mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +00:00
feat: show full item tooltip on action bar item hover
This commit is contained in:
parent
d7c4bdcd57
commit
0ffcf001a5
1 changed files with 8 additions and 3 deletions
|
|
@ -6103,12 +6103,17 @@ void GameScreen::renderActionBar(game::GameHandler& gameHandler) {
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
} else if (slot.type == game::ActionBarSlot::ITEM) {
|
} else if (slot.type == game::ActionBarSlot::ITEM) {
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
if (barItemDef && !barItemDef->name.empty())
|
// Prefer full rich tooltip from ItemQueryResponseData (has stats, quality, set info)
|
||||||
|
const auto* itemQueryInfo = gameHandler.getItemInfo(slot.id);
|
||||||
|
if (itemQueryInfo && itemQueryInfo->valid) {
|
||||||
|
inventoryScreen.renderItemTooltip(*itemQueryInfo);
|
||||||
|
} else if (barItemDef && !barItemDef->name.empty()) {
|
||||||
ImGui::Text("%s", barItemDef->name.c_str());
|
ImGui::Text("%s", barItemDef->name.c_str());
|
||||||
else if (!itemNameFromQuery.empty())
|
} else if (!itemNameFromQuery.empty()) {
|
||||||
ImGui::Text("%s", itemNameFromQuery.c_str());
|
ImGui::Text("%s", itemNameFromQuery.c_str());
|
||||||
else
|
} else {
|
||||||
ImGui::Text("Item #%u", slot.id);
|
ImGui::Text("Item #%u", slot.id);
|
||||||
|
}
|
||||||
if (onCooldown) {
|
if (onCooldown) {
|
||||||
float cd = slot.cooldownRemaining;
|
float cd = slot.cooldownRemaining;
|
||||||
if (cd >= 60.0f)
|
if (cd >= 60.0f)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue