feat(alerts): add scene-local recent ticker

Model the AlertBox and standalone ticker with shared settings; scene tickers render the in-memory active and queued events without saving history. Keep AlertBox content active-event-only.

Ref: https://obsproject.com/kb/obs-studio-overview
This commit is contained in:
2026-11-02 10:47:48 -08:00
parent 6208cb9409
commit 20f059422b
20 changed files with 339 additions and 90 deletions
+10 -1
View File
@@ -34,6 +34,15 @@ public static class AlertTickerRenderer
/// (0.5s on, 0.5s off — a 1Hz pulse for the whole alert).</summary>
public const double FlashHalfSeconds = 0.5;
public static VideoFrame? Render(Ticker ticker, string? text, double elapsedSeconds,
double alertSeconds, int readsPerAlert, int width, int height)
{
if (ticker == null) throw new ArgumentNullException(nameof(ticker));
return ticker.IsEnabled
? Render(text, elapsedSeconds, ticker.DisplayMethod, alertSeconds, readsPerAlert, width, height)
: null;
}
private static readonly object Gate = new();
private static readonly Dictionary<string, VideoFrame> StripCache = new();
@@ -179,4 +188,4 @@ public static class AlertTickerRenderer
}
return new VideoFrame(pillW, Height, pixels);
}
}
}