mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-21 09:13:46 +08:00
Merge remote-tracking branch 'origin/master' into only-chubbs
# Conflicts: # opendbc_repo # selfdrive/ui/sunnypilot/ui_state.py
This commit is contained in:
@@ -22,6 +22,19 @@ from openpilot.system.ui.sunnypilot.widgets.option_control import OptionControlS
|
||||
from openpilot.selfdrive.ui.ui_state import ui_state
|
||||
|
||||
|
||||
class Spacer(Widget):
|
||||
def __init__(self, height: int = 1):
|
||||
super().__init__()
|
||||
self._rect = rl.Rectangle(0, 0, 0, height)
|
||||
|
||||
def set_parent_rect(self, parent_rect: rl.Rectangle) -> None:
|
||||
super().set_parent_rect(parent_rect)
|
||||
self._rect.width = parent_rect.width
|
||||
|
||||
def _render(self, _):
|
||||
rl.draw_rectangle(int(self._rect.x), int(self._rect.y), int(self._rect.x + self._rect.width), int(self._rect.y), rl.Color(0,0,0,0))
|
||||
|
||||
|
||||
class Spacer(Widget):
|
||||
def __init__(self, height: int = 1):
|
||||
super().__init__()
|
||||
|
||||
Reference in New Issue
Block a user