feat: apply buff expiry color warning to target aura timers

Target frame debuff/buff timers now use the same urgency colors as
the player buff bar: white >30s, orange <30s, pulsing red <10s.
This commit is contained in:
Kelsi 2026-03-12 04:44:48 -07:00
parent fb6e7c7b57
commit 102b34db2f

View file

@ -2857,10 +2857,24 @@ void GameScreen::renderTargetFrame(game::GameHandler& gameHandler) {
ImVec2 textSize = ImGui::CalcTextSize(timeStr);
float cx = iconMin.x + (iconMax.x - iconMin.x - textSize.x) * 0.5f;
float cy = iconMax.y - textSize.y - 1.0f;
// Color by urgency (matches player buff bar)
ImU32 tTimerColor;
if (tRemainMs < 10000) {
float pulse = 0.7f + 0.3f * std::sin(
static_cast<float>(ImGui::GetTime()) * 6.0f);
tTimerColor = IM_COL32(
static_cast<int>(255 * pulse),
static_cast<int>(80 * pulse),
static_cast<int>(60 * pulse), 255);
} else if (tRemainMs < 30000) {
tTimerColor = IM_COL32(255, 165, 0, 255);
} else {
tTimerColor = IM_COL32(255, 255, 255, 255);
}
ImGui::GetWindowDrawList()->AddText(ImVec2(cx + 1, cy + 1),
IM_COL32(0, 0, 0, 200), timeStr);
ImGui::GetWindowDrawList()->AddText(ImVec2(cx, cy),
IM_COL32(255, 255, 255, 255), timeStr);
tTimerColor, timeStr);
}
// Stack / charge count — upper-left corner