feat(theme): Add NERV visual effects (scanlines, flicker) in src/theme_nerv_fx.py

This commit is contained in:
2026-03-09 00:49:20 -04:00
parent 9c38ea78f9
commit ccf4d3354a

20
src/theme_nerv_fx.py Normal file
View File

@@ -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)