ui: skip rendering when screen is off (#36510)

* skip rendering when screen is off

* continue and rename

* revert that

* flip

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
This commit is contained in:
Dean Lee
2025-10-29 04:09:49 +08:00
committed by GitHub
parent 8a77534d02
commit ef9683ee79
6 changed files with 26 additions and 18 deletions
+3 -4
View File
@@ -432,10 +432,9 @@ def main():
try:
gui_app.init_window("Setup", 20)
setup = Setup()
for showing_dialog in gui_app.render():
if showing_dialog:
continue
setup.render(rl.Rectangle(0, 0, gui_app.width, gui_app.height))
for should_render in gui_app.render():
if should_render:
setup.render(rl.Rectangle(0, 0, gui_app.width, gui_app.height))
setup.close()
except Exception as e:
print(f"Setup error: {e}")