Skip to content

About

Dot: the shared UI of the NextUI paks Kino, Musicdisk, Tuner and Speed (TrimUI Brick and Smart Pro), in C + SDL2

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dot

The shared look of the NextUI paks Kino, Musicdisk, Tuner and Speed (TrimUI Brick, 1024x768 at about 400 ppi, and TrimUI Smart Pro, 1280x720 at about 300 ppi): dark glass cards on an evening colour of each app's own, white for where you are, one accent dot for what is happening, dot-matrix numbers and titles, and type sized for the small screen (list rows 32 px).

Kino: browsing a series, the selected episode's picture and facts on the left, the episodes as rows

Kino: playing, paused, the time in dot-matrix numbers and a dotted progress bar

Musicdisk: now playing, a column of dots per channel and the round buttons

Tuner: all channels with what's on now and the next programme

The component sheet: keys, chips, toggles, sliders, rows, pills, dot-matrix times, a toast and the dock

Kino, Musicdisk and Tuner, and the component sheet test/shots.sh renders.

Added to each pak as a git submodule (ui/dot). C + SDL2 + SDL2_ttf.

  • src/dot_tokens.h: colours, type scale, sizes and layout bands (the same numbers as the style guide page).
  • The screen: dot_screen_detect() (before the window) picks the Brick's 1024x768 or the Smart Pro's 1280x720 from the display (DOT_SCREEN=WxH sets it, for shots), and DOT_W, DOT_H and the bottom bands follow it. Sizes stay in px: the Smart Pro's px are a third larger, so its extra width goes to wider content and its 48 px less height to the content band (96-592, the dock at 616; the Brick's 96-640 and 664).
  • src/dot.h, src/dot.c: the library. dot_init(renderer, font_dir, accent) and dot_set_theme(d, &theme) with the app's DOT_THEME_* (its evening ground and accent), then per frame dot_frame and the draw calls (ground, card, text, time, header, row, key, round, pill, toast, chip, toggle, slider, progress, option rows, panel, dock). Cards and rows are charcoal glass over the ground; dot_set_backdrop lets rounded corners take the colour of a picture drawn behind. Shapes and text are rendered once in software and cached as white textures tinted per draw, so it needs only SDL_Renderer (no SDL_RenderGeometry, works with SDL 2.0.14).
  • test/shots.sh: renders the guide's screens and a component sheet with the library to test/shots/*.png (Docker, headless software renderer), to compare with the style guide.
  • fonts/: Doto (round dots, static Black/Bold instances of the variable font), Geist, Geist Mono. All SIL OFL.

Buttons: A confirm/play, B back/close, X secondary, Y options, L1/R1 page or jump, SELECT switch view, START now playing, MENU quit. The dock shows only what works on the current screen, at most four hints.

About

Dot: the shared UI of the NextUI paks Kino, Musicdisk, Tuner and Speed (TrimUI Brick and Smart Pro), in C + SDL2

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages