From afcb1bf7585c4ac8a4456b35c09c6ebd5c739873 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 9 Mar 2026 00:58:22 -0400 Subject: [PATCH] feat(theme): Integrate NERV theme and visual effects into main GUI --- src/gui_2.py | 10 ++++++++++ src/theme_2.py | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/src/gui_2.py b/src/gui_2.py index a039365..6555908 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -15,6 +15,7 @@ from src import session_logger from src import project_manager from src import paths from src import theme_2 as theme +from src import theme_nerv_fx as theme_fx from src import api_hooks import numpy as np from src import log_registry @@ -130,6 +131,9 @@ class App: self._token_stats: dict[str, Any] = {} self._token_stats_dirty: bool = True self.perf_history: dict[str, list] = {"frame_time": [0.0] * 100, "fps": [0.0] * 100} + self._nerv_scanlines = theme_fx.ScanlineOverlay() + self._nerv_alert = theme_fx.AlertPulsing() + self._nerv_flicker = theme_fx.StatusFlicker() def _handle_approve_tool(self, user_data=None) -> None: """UI-level wrapper for approving a pending tool execution ask.""" @@ -293,6 +297,12 @@ class App: if bg.enabled: ws = imgui.get_io().display_size bg.render(ws.x, ws.y) + + if theme.is_nerv_active(): + ws = imgui.get_io().display_size + self._nerv_alert.update(self.ai_status) + self._nerv_alert.render(ws.x, ws.y) + self._nerv_scanlines.render(ws.x, ws.y) pushed_prior_tint = False if self.perf_profiling_enabled: self.perf_monitor.start_component("_gui_func") diff --git a/src/theme_2.py b/src/theme_2.py index 8645214..5849a7b 100644 --- a/src/theme_2.py +++ b/src/theme_2.py @@ -10,6 +10,7 @@ Scale uses imgui.get_style().font_scale_main. from imgui_bundle import imgui, hello_imgui from typing import Any, Optional +import src.theme_nerv # ------------------------------------------------------------------ palettes @@ -22,6 +23,7 @@ def _c(r: int, g: int, b: int, a: int = 255) -> tuple[float, float, float, float _PALETTES: dict[str, dict[int, tuple]] = { "ImGui Dark": {}, # empty = use imgui dark defaults + "NERV": {}, "10x Dark": { imgui.Col_.window_bg: _c( 34, 32, 28), imgui.Col_.child_bg: _c( 30, 28, 24), @@ -239,6 +241,9 @@ _child_transparency: float = 1.0 def get_current_palette() -> str: return _current_palette +def is_nerv_active() -> bool: + return _current_palette == "NERV" + def get_current_font_path() -> str: return _current_font_path @@ -270,6 +275,9 @@ def apply(palette_name: str) -> None: """ global _current_palette _current_palette = palette_name + if palette_name == 'NERV': + src.theme_nerv.apply_nerv() + return # 1. Apply base colors if palette_name in _PALETTES: