libmpv render API into an egui/glow texture, floating controls with a wavy seek bar and morphing play button, track/speed/chapter menus, playlist and adjust sheets, settings, open link, previews, smoke-test harness. Co-Authored-By: Claude Opus 5.5 <[email protected]>
30 lines
606 B
Rust
30 lines
606 B
Rust
//! Screens and overlays. Each piece draws from a `View` and pushes `Act`s for the app to apply.
|
|
|
|
pub mod chrome;
|
|
pub mod controls;
|
|
pub mod glyphs;
|
|
pub mod menu;
|
|
pub mod menus;
|
|
pub mod settings;
|
|
pub mod sheets;
|
|
|
|
use crate::app::Act;
|
|
use crate::config::Settings;
|
|
use crate::mpv::State;
|
|
use crate::theme::Theme;
|
|
|
|
pub struct View<'a> {
|
|
pub t: &'a Theme,
|
|
pub s: &'a State,
|
|
pub cfg: &'a Settings,
|
|
pub acts: &'a mut Vec<Act>,
|
|
pub now: f64,
|
|
/// How visible the controls are, 0..1.
|
|
pub vis: f32,
|
|
}
|
|
|
|
impl View<'_> {
|
|
pub fn act(&mut self, a: Act) {
|
|
self.acts.push(a);
|
|
}
|
|
}
|