diff --git a/src/theme_nerv_fx.py b/src/theme_nerv_fx.py new file mode 100644 index 0000000..e6a94c4 --- /dev/null +++ b/src/theme_nerv_fx.py @@ -0,0 +1,20 @@ +import time +import math +from imgui_bundle import imgui + +class ScanlineOverlay: + def __init__(self): + self.enabled = True + + def render(self, width: float, height: float): + if not self.enabled: + return + draw_list = imgui.get_foreground_draw_list() + color = imgui.get_color_u32((0.0, 0.0, 0.0, 0.06)) + for y in range(0, int(height), 2): + draw_list.add_line((0.0, float(y)), (float(width), float(y)), color, 1.0) + +class StatusFlicker: + def get_alpha(self) -> float: + # Modulate between 0.7 and 1.0 using sin wave + return 0.85 + 0.15 * math.sin(time.time() * 20.0)