From abfb6ecdb5bee51cedbe3437372aed731bfefb66 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Thu, 12 Mar 2026 13:36:06 -0700 Subject: [PATCH] feat: add spell name tooltips to nameplate debuff dots on hover When hovering over a player-applied DoT/debuff indicator square on an enemy nameplate, the spell name is now shown as a tooltip. Uses direct mouse-position hit test since nameplates render into the background draw list rather than an ImGui window. --- src/ui/game_screen.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index f3efeed3..423d374a 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -8005,6 +8005,18 @@ void GameScreen::renderNameplates(game::GameHandler& gameHandler) { drawList->AddRect (ImVec2(dotX - 1.0f, nameplateBottom - 1.0f), ImVec2(dotX + dotSize + 1.0f, nameplateBottom + dotSize + 1.0f), IM_COL32(0, 0, 0, A(150)), 1.0f); + + // Spell name tooltip on hover + { + ImVec2 mouse = ImGui::GetMousePos(); + if (mouse.x >= dotX && mouse.x < dotX + dotSize && + mouse.y >= nameplateBottom && mouse.y < nameplateBottom + dotSize) { + const std::string& dotSpellName = gameHandler.getSpellName(aura.spellId); + if (!dotSpellName.empty()) + ImGui::SetTooltip("%s", dotSpellName.c_str()); + } + } + dotX += dotSize + dotGap; if (dotX + dotSize > barX + barW) break; }