From 1c85b7a46d3479e330c0064bda0bdd1b62329add Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 9 Mar 2026 23:09:58 -0700 Subject: [PATCH] ui: add combo point display to player frame (Rogue/Druid) Adds 5 gold/grey dot indicators below the power bar in the player frame for Rogue (class 4) and Druid (class 11), showing the current combo point count from SMSG_UPDATE_COMBO_POINTS. Active points are bright gold; empty slots are dark grey. Dots are centered in the frame width. The display is always shown for Rogues; for Druids it only appears when combo points are non-zero (they only accumulate in Cat Form). --- src/ui/game_screen.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 5a890112..1d103bcd 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -1868,6 +1868,37 @@ void GameScreen::renderPlayerFrame(game::GameHandler& gameHandler) { } ImGui::Dummy(ImVec2(totalW, squareH)); } + + // Combo point display — Rogue (4) and Druid (11) in Cat Form + { + uint8_t cls = gameHandler.getPlayerClass(); + const bool isRogue = (cls == 4); + const bool isDruid = (cls == 11); + if (isRogue || isDruid) { + uint8_t cp = gameHandler.getComboPoints(); + if (cp > 0 || isRogue) { // always show for rogue; only when non-zero for druid + ImGui::Spacing(); + ImVec2 cursor = ImGui::GetCursorScreenPos(); + float totalW = ImGui::GetContentRegionAvail().x; + constexpr int MAX_CP = 5; + constexpr float DOT_R = 7.0f; + constexpr float SPACING = 4.0f; + float totalDotsW = MAX_CP * (DOT_R * 2.0f) + (MAX_CP - 1) * SPACING; + float startX = cursor.x + (totalW - totalDotsW) * 0.5f; + float cy = cursor.y + DOT_R; + ImDrawList* dl = ImGui::GetWindowDrawList(); + for (int i = 0; i < MAX_CP; ++i) { + float cx = startX + i * (DOT_R * 2.0f + SPACING) + DOT_R; + ImU32 col = (i < static_cast(cp)) + ? IM_COL32(255, 210, 0, 240) // bright gold — active + : IM_COL32(60, 60, 60, 160); // dark — empty + dl->AddCircleFilled(ImVec2(cx, cy), DOT_R, col); + dl->AddCircle(ImVec2(cx, cy), DOT_R, IM_COL32(160, 140, 0, 180), 0, 1.5f); + } + ImGui::Dummy(ImVec2(totalW, DOT_R * 2.0f)); + } + } + } } ImGui::End();