Skip to content

Overlay GUI: grouped, keyboard-driven on-device control#39

Merged
joschaschmiedt merged 5 commits into
mainfrom
wip-overlay-gui-production
Jun 29, 2026
Merged

Overlay GUI: grouped, keyboard-driven on-device control#39
joschaschmiedt merged 5 commits into
mainfrom
wip-overlay-gui-production

Conversation

@joschaschmiedt

@joschaschmiedt joschaschmiedt commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Brings the on-device egui overlay to a usable production state for operating the stimulus server at the rig without an external client. The overlay becomes a set of grouped, keyboard-driven panels with creation dialogs for stimuli and animations, plus the input-handling fixes needed to make it work reliably on both the winit and DRM/console backends.

What changed

Overlay UI

  • Grouped panels toggled with F1–F7, with a focused-panel concept for keyboard navigation; Shift+Fn hides a panel and backtick toggles master visibility.
  • Creation dialogs: new stimulus_dialog.rs (create rect/circle/ellipse/grating/text) and animation_dialog.rs (flash/flicker/trigger-coupled/move animations).
  • overlay_state.rs extracted to own panel visibility, focus, and dialog state; overlay.rs substantially reworked around the grouped layout.
  • Focus border now drawn on the panel's clip_rect rather than max_rect (correct bounds).

Input handling

  • Fix for the F keys not reaching the app on the winit backend (hotkeys were being swallowed before the app saw them).
  • DRM keyboard input reworked to route function keys / modifiers for panel focus and hide.
  • --windowed now fails with a clear error in a DRM/console-only environment instead of an opaque failure.

joschaschmiedt and others added 5 commits June 26, 2026 20:00
Reorganize the debug overlay into focusable groups toggled by F1–F7 with a
backtick master toggle, multiple visible at once. Esc closes a dialog or hides
the overlay and never quits. Add DRM character input so dialog text fields are
typeable on the mouseless rig, keyboard-driven create dialogs for stimuli
(rect/circle/ellipse/grating) and animations, an animations list with
arm/disarm/trigger, and focusable VTL fire buttons. Photodiode/wireframe move
into the System group; demo spawn (D) only fires while the overlay is hidden.

WIP: windowed visual pass not yet done.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G4wdxVhGBJ7yt1kDQpGkfV
…owed DRM error

- Panels now lay out horizontally based on visible-count column positions
  (320px slots) instead of absolute group index, eliminating gaps and overlap.
  Each panel gets a default_width(310) constraint on first show.
- F-key press surrenders egui's current focus before the new panel claims it,
  so Tab events queued in the same batch navigate the newly focused panel.
- Plain F1–F7: show_group (always makes visible + focuses; idempotent).
  Shift+F1–F7: hide_group (hides panel; auto-hides overlay when none remain).
  AppKey::SelectGroup replaced by ShowGroup / HideGroup on both backends.
- --windowed now exits with a clear error when DRM mode would be selected
  (no DISPLAY / WAYLAND_DISPLAY set).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
clip_rect is the physical panel boundary, which sits outside the
content inner_margin. max_rect is the content area start, so the
old StrokeKind::Inside border overlapped the first content column.

Also switches group_frame to Frame::side_top_panel so inner_margin
is correct, and drops the redundant custom stroke.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019eqNJz6vowBYWeBRJBUQzZ
@joschaschmiedt joschaschmiedt changed the title Wip overlay gui production Overlay GUI: grouped, keyboard-driven on-device control Jun 29, 2026
@joschaschmiedt joschaschmiedt merged commit eee787d into main Jun 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant