Commit Graph

44 Commits

Author SHA1 Message Date
Shane Smiskol
7b35f64049 raylib UI: implement easier to use Scroller (#35606)
* new scroller and widget

start

heck yeah

fix that

clean up

* fuck yeah

* line sep

* fix that

* fix clicking on action

* no custom width

* move all over

* clean up

* more clean up

* rm custom visible too

* more clean up

* lint

* dont use enabled generically yet

* ??
2025-06-26 17:58:34 -07:00
Dean Lee
53d757a84f ui: fix raylib log message formatting by handing va_list arguments (#35561)
* fix raylib log message formatting by handing va_list arguments

* dd

* improve&simplify

* chadder says this works

* consis

* clean up

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-26 15:12:16 -07:00
Dean Lee
d5b5383f1a ui: enable VSYNC by default (#35564)
enable VSYNC by default to fix visual artifacts on device
2025-06-25 01:02:17 -07:00
Dean Lee
3d987cb9b5 ui: fix wrong dash character (#35530)
Fix wrong dash character
2025-06-11 11:26:14 -07:00
Dean Lee
03d2e7b2b0 ui: extract Widget base class to separate lib/widget.py (#35520)
* extract Widget base class to separate lib/widget.py

* format

* format

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-06-10 14:32:20 -07:00
Dean Lee
f824e6c0ec ui: implement reset calibration feature in device settings (#35479)
* implement reset calibration feature in device settings

* check confirm dialog result

* fix null check

* use enum

* use enum
2025-06-08 20:08:01 -07:00
Dean Lee
e93a7234bc pyui: add DialogResult enum (#35500)
add DialogResult enum
2025-06-08 19:12:56 -07:00
Dean Lee
a3daca8fd5 ui: implement PrimeAdWidget (#35496)
implement PrimeAdWidget
2025-06-08 13:05:30 -07:00
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
Shane Smiskol
3ce87d0ac9 raylib: base widget class (#35484)
* use some widgets

* consistent name draw -> render

* more

* rest
2025-06-06 19:32:03 -07:00
Shane Smiskol
a1ee5f5ba8 raylib spinner: temp fix crash 2025-06-06 17:18:50 -07:00
Shane Smiskol
29830440b4 format raylib (#35483)
* format raylib

* not really sure what this is
2025-06-06 15:43:47 -07:00
Dean Lee
6767bfce44 ui: add ModalOverlay system for unified modal dialog management (#35478)
add ModalOverlay
2025-06-06 13:18:07 -07:00
Shane Smiskol
fb6243688d raylib: rename DEBUG_FPS 2025-06-03 14:53:26 -07:00
Dean Lee
29afd667cc move onroad/driving stuff from system/ui to selfdrive/ui (#35425)
* mv system/ui/onroad->selfdrive/ui/onroad

* mv ui_state

* fix import path

* fix imports

* mv cameraview

* remove from application
2025-06-02 13:27:17 -07:00
Dean Lee
d46066225d system/ui: add centralized UIState singleton for global state management (#35397)
* add centralized UIState singleton for global state management

* safely import ui_state

* merge master

* merge master
2025-06-02 10:18:44 -07:00
Dean Lee
79f3f30c63 system/ui: fix cruise disabled state displaying "?" instead of "–" (#35416)
fix curise disabled state showed '?'
2025-06-01 12:39:09 -07:00
Dean Lee
04115b6417 system/ui: Increase font size to reduce edge aliasing (#35401)
improve text's antialiasing
2025-05-30 23:44:13 -07:00
Cameron Clough
2722e12e62 fix(system/ui): typo 2025-05-20 15:48:44 +01:00
Cameron Clough
5667583198 system/ui: define character set for loading fonts (#35298)
* system/ui: define font character set

* remove debug print statement

* shorter
2025-05-20 15:47:10 +01:00
Dean Lee
38c1bd096b system/ui: Improve UI rendering smoothness for scaled display (#35280)
improve smoothness
2025-05-19 14:56:45 +01:00
Cameron Clough
15c7d556f6 Reapply "system/ui: add SCALE env var (#35272)" (#35273)
* Reapply "system/ui: add SCALE env var (#35272)"

This reverts commit e2569a8b32.

* set mouse scale factor
2025-05-19 00:33:52 +01:00
Cameron Clough
e2569a8b32 Revert "system/ui: add SCALE env var (#35272)"
This reverts commit ed0f812995.
2025-05-19 00:27:35 +01:00
Adeeb Shihadeh
ed0f812995 system/ui: add SCALE env var (#35272)
* ui: add SCALE env var

* linting

* cleaner

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2025-05-19 00:21:20 +01:00
Cameron Clough
da670108e7 system/ui: all font weights (#35255) 2025-05-17 00:23:55 +01:00
Cameron Clough
8097a92515 zipapp pack (#35253)
Used to ship python UI in agnos without an openpilot clone

* add a main method to target

* pack script

* validate inputs

* refactors

* copy into temp, dont keep this

* cleanup

* help messages

* rename to pack.py

* pack.py

* updates for device

* moar

* don't use cereal

* just log normally

* use importlib.resources

* revert

* Revert "don't use cereal"

This reverts commit 7208524d422d88a1b07e209359aeb25e8b3bf4e7.

* fix cereal?

* cleanup

* Revert "cleanup"

This reverts commit 921edfe5020f244dbdf4f26767af7c98ca837d1c.

* cython hotfix

* Reapply "cleanup"

This reverts commit 9b54552f784dea1b1eb4ffc03937571e4fc851ba.

* more cleanup

* any script?

* slightly clearer

* rm print

* nothing python should use SVGs

---------

Co-authored-by: Trey Moen <trey@moen.ai>
2025-05-16 22:24:03 +01:00
Cameron Clough
512d83cc36 ui(raylib): setup.py (#35140)
* setup.py

* better font

* use gui_button

* btn

* fix button and triangle

* low voltage text color

* fix network page

* HARDWARE.get_os_version()

* typing

* white title

* update default text color

* use default font color

* fix software screen

* fix software screen

* radio font size

* line length

* fix regex

* draw svgs

* comment is out of date

* add cairosvg

* use cairosvg

* remove unused import

* support other image types

* revert origin

* fix setup warning icon

* fix

* remove cairosvg

* use pngs

* wrap

* fix disabled style

* TODO

* revert uv.lock

* use new file paths (not rasterized yet)

* oops

* fixes

* params not used

* network check thread

* oops

* fix custom URL and download failed screens

* clear keyboard

* rm

* fixes

* show full error message

* check network type
2025-05-16 12:41:20 +01:00
Cameron Clough
83679bd856 selfdrive/assets: rasterize SVGs (#35243)
* selfdrive/assets: rasterize SVGs

* do entire assets dir

* fixed size - 4096px is a lot

* optimise them too

* use inkscape

* regenerate

* abandon runtime svg
2025-05-16 01:33:16 +01:00
Dean Lee
f1c0109c89 system/ui: Fix crash when exiting the application with CTRL+C (KeyboardInterrupt). (#35221)
handle KeyboardInterrupt
2025-05-14 11:18:08 -07:00
Dean Lee
b1bdab0c90 system/ui: improve texture caching (#35222)
improve texture caching
2025-05-14 16:11:38 +01:00
Dean Lee
c57f576436 system/ui: fix FPS drop issues (#35220)
set VSYNC flag only when the env is set
2025-05-14 14:49:47 +01:00
Adeeb Shihadeh
35dbdf9124 raylib: fwd everything to cloudlog 2025-05-11 11:08:50 -07:00
Dean Lee
bfadab078e system/ui: set log level to WARNING to reduce noise (#35180)
* set log level to WARNING to reduce noise

* custom callback handling for raylib logs
2025-05-11 11:05:59 -07:00
Cameron Clough
4bbbe3d2d1 ui(raylib): revert fps to 60 (#35163)
bump default fps
2025-05-08 22:22:53 +01:00
Cameron Clough
7c223e5586 ui(raylib): decrease target FPS to 30 (#35062) 2025-04-24 21:00:48 +01:00
Cameron Clough
196848c023 ui(raylib): set display power and brightness on init (#35060)
* add set_display_power to hardware.py

* set display power and brightness on app init
2025-04-24 15:55:15 +01:00
Cameron Clough
281a72780b Reapply "ui(raylib): "exit" btn in text window on PC" (#35053)
* ui(raylib): "exit" btn in text window on PC

* unused import

* request close

* this was missing
2025-04-23 14:06:09 +01:00
Cameron Clough
23524e2038 ui(raylib): reduce spinner rotation artifact (#35048)
* ui(raylib): reduce spinner rotation artifact

A visual artifact (white pixels) appeared on the edge of the
rotating spinner track texture, likely due to RGB color bleed during
bilinear filtering in Raylib.

Pre-multiplying the alpha channel of the spinner track image using
`rl.image_alpha_premultiply` significantly reduces the visibility of the
artifact.

* lint
2025-04-22 15:28:54 +01:00
Cameron Clough
4f913f0cfb ui(raylib): fix typos (#35030) 2025-04-18 01:11:22 +01:00
Dean Lee
6d12ade231 python ui: refactor spinner&text (#34897)
refactor spinner&text
2025-03-19 13:11:22 -07:00
Dean Lee
2d2efb3f58 pyui: implement styled label and text box (#34813)
implement styled label
2025-03-07 14:20:49 -08:00
Dean Lee
ca05c25ba2 python ui: Implement FPS monitor (#34605)
monitor fps
2025-02-17 08:10:36 -08:00
Dean Lee
d4d0312794 python ui: display FPS on top-left corner if DEBUG_FPS=1 (#34595)
* display FPS on top-left corner if DEBUG_FPS=1

* use generator

* use rl.draw_fps
2025-02-16 12:35:04 -08:00
Dean Lee
ce7ff5c0e6 ui: Initial UI rewrite using pyray (spinner and text window) (#34583)
* pyray init version

* remove c++ code

* cleanup

* restruct the directory layout

* improve GuiApplication

* smooth out the texture after resize

* use atexit to close app

* rename FontSize->FontWeight

* make files executable

* use Inter Regular for FrontWeight.NORMAL

* set FLAG_VSYNC_HINT to avoid tearing while scrolling

* smoother scrolling

* mange textures in gui_app
2025-02-15 12:44:20 -08:00