mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: add item tooltips to quest objective item tracking
This commit is contained in:
parent
0ffcf001a5
commit
fe4fc714c3
1 changed files with 16 additions and 0 deletions
|
|
@ -485,12 +485,28 @@ void QuestLogScreen::render(game::GameHandler& gameHandler, InventoryScreen& inv
|
|||
auto reqIt = sel.requiredItemCounts.find(itemId);
|
||||
if (reqIt != sel.requiredItemCounts.end()) required = reqIt->second;
|
||||
VkDescriptorSet iconTex = dispId ? invScreen.getItemIcon(dispId) : VK_NULL_HANDLE;
|
||||
const auto* objInfo = gameHandler.getItemInfo(itemId);
|
||||
if (iconTex) {
|
||||
ImGui::Image((ImTextureID)(uintptr_t)iconTex, ImVec2(14, 14));
|
||||
if (objInfo && objInfo->valid && ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
invScreen.renderItemTooltip(*objInfo);
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("%s: %u/%u", itemLabel.c_str(), count, required);
|
||||
if (objInfo && objInfo->valid && ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
invScreen.renderItemTooltip(*objInfo);
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
} else {
|
||||
ImGui::BulletText("%s: %u/%u", itemLabel.c_str(), count, required);
|
||||
if (objInfo && objInfo->valid && ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
invScreen.renderItemTooltip(*objInfo);
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue