From e415451f89b5c1b8e2a336a78081de23fd31c43a Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 11 Mar 2026 21:03:51 -0700 Subject: [PATCH] Show item icons inline in chat item links --- src/ui/game_screen.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 74c9e6b4..bd22b369 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -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);