mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-24 09:52:05 +08:00
big ui
This commit is contained in:
@@ -17,6 +17,7 @@ PERSONALITY_TO_INT = log.LongitudinalPersonality.schema.enumerants
|
||||
|
||||
# Description constants
|
||||
DESCRIPTIONS = {
|
||||
"HideCamera": tr_noop("hide camera from onroad ui"),
|
||||
"OpenpilotEnabledToggle": tr_noop(
|
||||
"Use the sunnypilot system for adaptive cruise control and lane keep driver assistance. " +
|
||||
"Your attention is required at all times to use this feature."
|
||||
@@ -46,6 +47,12 @@ class TogglesLayout(Widget):
|
||||
|
||||
# param, title, desc, icon, needs_restart
|
||||
self._toggle_defs = {
|
||||
"HideCamera": (
|
||||
lambda: tr("Hide Camera"),
|
||||
DESCRIPTIONS["HideCamera"],
|
||||
"chffr_wheel.png",
|
||||
False,
|
||||
),
|
||||
"OpenpilotEnabledToggle": (
|
||||
lambda: tr("Enable sunnypilot"),
|
||||
DESCRIPTIONS["OpenpilotEnabledToggle"],
|
||||
|
||||
@@ -88,6 +88,8 @@ class AugmentedRoadView(CameraView):
|
||||
|
||||
# Render the base camera view
|
||||
super()._render(rect)
|
||||
if ui_state.hide_camera:
|
||||
rl.draw_rectangle_rec(self._content_rect, rl.BLACK)
|
||||
|
||||
# Draw all UI overlays
|
||||
self.model_renderer.render(self._content_rect)
|
||||
|
||||
Reference in New Issue
Block a user