mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Show item icons inline in chat item links
This commit is contained in:
parent
5bafacc372
commit
e415451f89
1 changed files with 16 additions and 0 deletions
|
|
@ -1090,6 +1090,22 @@ void GameScreen::renderChatWindow(game::GameHandler& gameHandler) {
|
|||
gameHandler.ensureItemInfo(itemEntry);
|
||||
}
|
||||
|
||||
// Show small icon before item link if available
|
||||
if (itemEntry > 0) {
|
||||
const auto* chatInfo = gameHandler.getItemInfo(itemEntry);
|
||||
if (chatInfo && chatInfo->valid && chatInfo->displayInfoId != 0) {
|
||||
VkDescriptorSet chatIcon = inventoryScreen.getItemIcon(chatInfo->displayInfoId);
|
||||
if (chatIcon) {
|
||||
ImGui::Image((ImTextureID)(uintptr_t)chatIcon, ImVec2(12, 12));
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
|
||||
renderItemLinkTooltip(itemEntry);
|
||||
}
|
||||
ImGui::SameLine(0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Render bracketed item name in quality color
|
||||
std::string display = "[" + itemName + "]";
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, linkColor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue