wip: "multiple cascading refactors"

https://loglog.games/blog/leaving-rust-gamedev/#orphan-rule-should-be-optional is on point
This commit is contained in:
🪞👃🪞 2024-09-09 21:25:04 +03:00
parent 20afc397ea
commit fa8282a9d5
18 changed files with 175 additions and 222 deletions

View file

@ -30,12 +30,13 @@ impl<E: Engine> Process for Mixer<E> {
Control::Continue
}
}
impl Render<Tui> for Mixer<Tui> {
fn render (&self, to: &mut Tui) -> Perhaps<[u16;4]> {
impl Content for Mixer<Tui> {
type Engine = Tui;
fn content (&self) -> impl Widget<Engine = Tui> {
let mut tracks = Split::right();
for channel in self.tracks.iter() {
tracks = tracks.add_ref(channel)
}
tracks.render(to)
tracks
}
}