From 63f4d10ab1e09f62c01e451ad6c21314274e9919 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 17 Mar 2026 20:02:02 -0700 Subject: [PATCH] fix: apply interruptibility coloring to target-of-target cast bar The ToT (target-of-target) cast bar was still using a fixed orange-yellow color regardless of spell interruptibility. Now uses the same green/red scheme as the target frame and nameplate cast bars: green = interruptible (can Kick/Counterspell), red = not interruptible, both pulse at >80%. --- src/ui/game_screen.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index cd4d0589..dd10209d 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -4645,16 +4645,20 @@ void GameScreen::renderTargetFrame(game::GameHandler& gameHandler) { ImGui::PopStyleColor(); } - // ToT cast bar — orange-yellow, pulses when near completion + // ToT cast bar — green if interruptible, red if not; pulses near completion if (auto* totCs = gameHandler.getUnitCastState(totGuid)) { float totCastPct = (totCs->timeTotal > 0.0f) ? (totCs->timeTotal - totCs->timeRemaining) / totCs->timeTotal : 0.0f; ImVec4 tcColor; if (totCastPct > 0.8f) { float pulse = 0.7f + 0.3f * std::sin(static_cast(ImGui::GetTime()) * 8.0f); - tcColor = ImVec4(1.0f * pulse, 0.5f * pulse, 0.0f, 1.0f); + tcColor = totCs->interruptible + ? ImVec4(0.2f * pulse, 0.9f * pulse, 0.2f * pulse, 1.0f) + : ImVec4(1.0f * pulse, 0.1f * pulse, 0.1f * pulse, 1.0f); } else { - tcColor = ImVec4(0.8f, 0.5f, 0.1f, 1.0f); + tcColor = totCs->interruptible + ? ImVec4(0.2f, 0.75f, 0.2f, 1.0f) + : ImVec4(0.85f, 0.15f, 0.15f, 1.0f); } ImGui::PushStyleColor(ImGuiCol_PlotHistogram, tcColor); char tcLabel[48];