refactor(theme): Introduce semantic theme layer and clean NERV cruft from gui_2.py

This commit is contained in:
2026-05-12 20:24:47 -04:00
parent b53fc19f99
commit 12465fd04c
4 changed files with 450 additions and 393 deletions
+15
View File
@@ -86,6 +86,21 @@ class _ScopePopup:
imgui.end_popup()
return False
def popup_modal(name: str, visible: bool = True, flags: int = 0): return _ScopePopupModal(name, visible, flags)
class _ScopePopupModal:
def __init__(self, name: str, visible: bool, flags: int):
self._name = name
self._visible = visible
self._flags = flags
self._active = False
def __enter__(self):
self._active, self._visible = imgui.begin_popup_modal(self._name, self._visible, self._flags)
return self._active, self._visible
def __exit__(self, *args):
if self._active:
imgui.end_popup()
return False
def tooltip(): return _ScopeTooltip()
class _ScopeTooltip:
def __enter__(self):