feat: show full item tooltip on action bar item hover

This commit is contained in:
Kelsi 2026-03-12 13:14:24 -07:00
parent d7c4bdcd57
commit 0ffcf001a5

View file

@ -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)