gemini 3.1 fails
This commit is contained in:
@@ -160,3 +160,39 @@ class _ScopeTabItem:
|
||||
if self._expanded:
|
||||
imgui.end_tab_item()
|
||||
return False
|
||||
|
||||
def style_color(col: int, val: Any): return _ScopeStyleColor(col, val)
|
||||
class _ScopeStyleColor:
|
||||
def __init__(self, col: int, val: Any):
|
||||
self._col = col
|
||||
self._val = val
|
||||
def __enter__(self):
|
||||
imgui.push_style_color(self._col, self._val)
|
||||
def __exit__(self, *args):
|
||||
imgui.pop_style_color()
|
||||
return False
|
||||
|
||||
def style_var(var: int, val: Any): return _ScopeStyleVar(var, val)
|
||||
class _ScopeStyleVar:
|
||||
def __init__(self, var: int, val: Any):
|
||||
self._var = var
|
||||
self._val = val
|
||||
def __enter__(self):
|
||||
imgui.push_style_var(self._var, self._val)
|
||||
def __exit__(self, *args):
|
||||
imgui.pop_style_var()
|
||||
return False
|
||||
|
||||
def tree_node_ex(label: str, flags: int = 0): return _ScopeTreeNodeEx(label, flags)
|
||||
class _ScopeTreeNodeEx:
|
||||
def __init__(self, label: str, flags: int):
|
||||
self._label = label
|
||||
self._flags = flags
|
||||
self._opened = False
|
||||
def __enter__(self):
|
||||
self._opened = imgui.tree_node_ex(self._label, self._flags)
|
||||
return self._opened
|
||||
def __exit__(self, *args):
|
||||
if self._opened:
|
||||
imgui.tree_pop()
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user