feat(bleed): add working Quit to _show_menus via runner_params.app_shall_exit
Adds 'manual slop' menu before 'Windows' in the live HelloImGui menubar callback. Quit sets self.runner_params.app_shall_exit = True — the correct HelloImGui API. Previously the only quit path was the window close button. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
4
gui_2.py
4
gui_2.py
@@ -1613,6 +1613,10 @@ class App:
|
|||||||
# ---------------------------------------------------------------- gui
|
# ---------------------------------------------------------------- gui
|
||||||
|
|
||||||
def _show_menus(self) -> None:
|
def _show_menus(self) -> None:
|
||||||
|
if imgui.begin_menu("manual slop"):
|
||||||
|
if imgui.menu_item("Quit", "Ctrl+Q", False)[0]:
|
||||||
|
self.runner_params.app_shall_exit = True
|
||||||
|
imgui.end_menu()
|
||||||
if imgui.begin_menu("Windows"):
|
if imgui.begin_menu("Windows"):
|
||||||
for w in self.show_windows.keys():
|
for w in self.show_windows.keys():
|
||||||
_, self.show_windows[w] = imgui.menu_item(w, "", self.show_windows[w])
|
_, self.show_windows[w] = imgui.menu_item(w, "", self.show_windows[w])
|
||||||
|
|||||||
Reference in New Issue
Block a user