Files
sunnypilot/selfdrive/ui/ui.py
Dean Lee 2e41d959ac ui: add main UI entry point (#35422)
* add new main UI entry point

* cleanup

* mv to selfdrive/ui

* fix imports

* handle_mouse_click

* use ui_state

* remove ui_state from gui_app

* setup callbacks

* handle clicks

* put layouts in a dict

* update state in render

* rebase master

* implement settings sidebar

* rename files
2025-06-03 23:12:36 -07:00

21 lines
495 B
Python
Executable File

#!/usr/bin/env python3
import pyray as rl
from openpilot.system.ui.lib.application import gui_app
from openpilot.selfdrive.ui.layouts.main import MainLayout
from openpilot.selfdrive.ui.ui_state import ui_state
def main():
gui_app.init_window("UI")
main_layout = MainLayout()
for _ in gui_app.render():
ui_state.update()
#TODO handle brigntness and awake state here
main_layout.render(rl.Rectangle(0, 0, gui_app.width, gui_app.height))
if __name__ == "__main__":
main()