From ea1af872661fba707580e59d1cb8c965fbeaaaae Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 9 Mar 2026 17:08:14 -0700 Subject: [PATCH] Show aura charge/stack count on buff bar and target frame icons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When an aura has more than 1 charge, render the count in gold in the upper-left corner of the icon (with drop shadow) — same position as WoW's stack counter. Applied to both the player buff bar and target frame auras. --- src/ui/game_screen.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 42e30643..68e0024b 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -2016,6 +2016,17 @@ void GameScreen::renderTargetFrame(game::GameHandler& gameHandler) { IM_COL32(255, 255, 255, 255), timeStr); } + // Stack / charge count — upper-left corner + if (aura.charges > 1) { + ImVec2 iconMin = ImGui::GetItemRectMin(); + char chargeStr[8]; + snprintf(chargeStr, sizeof(chargeStr), "%u", static_cast(aura.charges)); + ImGui::GetWindowDrawList()->AddText(ImVec2(iconMin.x + 3, iconMin.y + 3), + IM_COL32(0, 0, 0, 200), chargeStr); + ImGui::GetWindowDrawList()->AddText(ImVec2(iconMin.x + 2, iconMin.y + 2), + IM_COL32(255, 220, 50, 255), chargeStr); + } + // Tooltip if (ImGui::IsItemHovered()) { std::string name = spellbookScreen.lookupSpellName(aura.spellId, assetMgr); @@ -5459,6 +5470,18 @@ void GameScreen::renderBuffBar(game::GameHandler& gameHandler) { IM_COL32(255, 255, 255, 255), timeStr); } + // Stack / charge count overlay — upper-left corner of the icon + if (aura.charges > 1) { + ImVec2 iconMin = ImGui::GetItemRectMin(); + char chargeStr[8]; + snprintf(chargeStr, sizeof(chargeStr), "%u", static_cast(aura.charges)); + // Drop shadow then bright yellow text + ImGui::GetWindowDrawList()->AddText(ImVec2(iconMin.x + 3, iconMin.y + 3), + IM_COL32(0, 0, 0, 200), chargeStr); + ImGui::GetWindowDrawList()->AddText(ImVec2(iconMin.x + 2, iconMin.y + 2), + IM_COL32(255, 220, 50, 255), chargeStr); + } + // Right-click to cancel buffs / dismount if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) { if (gameHandler.isMounted()) {