starting to get decent compression

This commit is contained in:
2026-05-12 00:45:21 -04:00
parent a0a537ff01
commit 1ed2d3e139
2 changed files with 28 additions and 9 deletions
+25
View File
@@ -114,3 +114,28 @@ class _ScopeId:
def __exit__(self, *args):
imgui.pop_id()
return False
def tab_bar(id_str: str, flags: int = 0): return _ScopeTabBar(id_str, flags)
class _ScopeTabBar:
def __init__(self, id_str: str, flags: int):
self._id = id_str
self._flags = flags
def __enter__(self):
return imgui.begin_tab_bar(self._id, self._flags)
def __exit__(self, *args):
imgui.end_tab_bar()
return False
def tab_item(label: str, flags: int = 0): return _ScopeTabItem(label, flags)
class _ScopeTabItem:
def __init__(self, label: str, flags: int):
self._label = label
self._flags = flags
self._open = None
def __enter__(self):
self._open = imgui.begin_tab_item(self._label, self._flags)
return self._open
def __exit__(self, *args):
if self._open[0]:
imgui.end_tab_item()
return False