Files
StarPilot/selfdrive/ui/layouts/settings/software.py
T
Shane Smiskol 2c59b5f8c6 raylib: common mouse press hook (#35489)
* something like this

* need these

* rest

* another pr

* what is this merge conflict

f

* fix mouse down

* rm that!

* fix that

* rearrange

* fix bug where mouse held down on widget, dragged off, then let go

* temp

* fix that

* missing init
2025-06-06 23:00:55 -07:00

25 lines
829 B
Python

from openpilot.system.ui.lib.application import Widget
from openpilot.system.ui.lib.list_view import ListView, button_item, text_item
class SoftwareLayout(Widget):
def __init__(self):
super().__init__()
items = [
text_item("Current Version", ""),
button_item("Download", "CHECK", callback=self._on_download_update),
button_item("Install Update", "INSTALL", callback=self._on_install_update),
button_item("Target Branch", "SELECT", callback=self._on_select_branch),
button_item("Uninstall", "UNINSTALL", callback=self._on_uninstall),
]
self._list_widget = ListView(items)
def _render(self, rect):
self._list_widget.render(rect)
def _on_download_update(self): pass
def _on_install_update(self): pass
def _on_select_branch(self): pass
def _on_uninstall(self): pass