Conversation
Process replay diff reportReplays driving segments through this PR and compares the behavior to master. ✅ 0 changed, 66 passed, 0 errors |
UI Previewmici: |
selfdrive/ui/mici/layouts/home.py
Outdated
| rl.draw_texture_ex(self._bell_txt, rl.Vector2(bell_x, bell_y), 0.0, 1.0, rl.WHITE) | ||
|
|
||
| count_rect = rl.Rectangle(pill_x, pill_y, pill_w - 20, pill_h) | ||
| gui_label(count_rect, str(alert_count), font_size=36, color=rl.WHITE, |
There was a problem hiding this comment.
Prefer UnifiedLabel and WIdgets in general if content is expected to be laid out, for example, can't add this to HorizontalLayout class in the future
| def _update_state(self): | ||
| self._alerts_layout._update_state() |
There was a problem hiding this comment.
why is it not updating state? how does it normally work? oh it's out of view. this will double run it when in view. and make sure to call super() _update state
There was a problem hiding this comment.
can make alerts a singleton in the future
selfdrive/ui/mici/layouts/home.py
Outdated
| # alerts pill | ||
| self._pill_bg_txt = gui_app.texture("icons_mici/alerts_pill.png", 104, 52) | ||
| self._bell_txt = gui_app.texture("icons_mici/alerts_bell.png", 28, 30) | ||
|
|
There was a problem hiding this comment.
class self contains all this and allows you to use it anywhere if needed later

Show bell icon with notification count in a pill at the bottom-right corner when there are active offroad alerts.
The count is sourced from MiciOffroadAlerts.active_alerts().