Expand description
egui-based Options overlay rendered on top of the MilkDrop visuals.
The overlay shows two tabs — Visuals and Engine — covering
the V1 scope of the user-facing settings (see settings.rs). The
widgets mutate a Settings struct in place; this module also
returns an OptionsActions bundle so the caller can apply the
diff to the live engine (mesh rebuild, profile toggle, …) and
persist it.
Toggled by the Tab key. While open, Esc closes the overlay
instead of quitting the app.
Structs§
- HudData
- Per-frame data the HUD needs from
main.rs. Decoupled fromOptionsUiso the panel itself stays stateless about engine internals. - Options
Actions - Diff produced by drawing one frame of the Options UI.
- Options
Ui - Stateful egui overlay. Owns the renderer + the winit event translator; the visualiser keeps one of these for the life of the window.
Enums§
- Tab 🔒
- Which tab is currently in front.
Constants§
- BEAT_
MODE_ 🔒NAMES - Beat-detection mode variants the picker can offer. Mirrors
BeatDetectionMode::next()’s cycle so the dropdown order is predictable. TheHardCut6variant has aspecial_presetfield that the GUI never edits — we materialise it with an empty string when the user selects it, whichBeatDetectorhandles identically. - MESH_
PRESETS 🔒 - Concrete mesh sizes for the named quality presets. Kept in lockstep
with
onedrop_renderer::MeshQuality::size; we duplicate here so the dropdown can list “Custom” without forcing a round-trip through the renderer crate just for labels.
Functions§
- draw_
audio_ 🔒tab - draw_
engine_ 🔒tab - draw_
hud 🔒 - Translucent corner HUD: FPS + current preset name + mesh size.
Drawn even when the options panel is hidden, gated by
Settings::window::hud. - draw_
options_ 🔒window - draw_
playback_ 🔒tab - draw_
visuals_ 🔒tab - draw_
window_ 🔒tab - mode_
from_ 🔒name