This commit is contained in:
i do not exist 2026-06-19 20:23:53 +03:00
parent b44dc635ef
commit 80fe958476
8 changed files with 69 additions and 45 deletions

View file

@ -118,12 +118,16 @@ pub trait HasPlayClip: HasClock {
let MidiClip { ref name, color, .. } = *clip.read().unwrap();
(name.clone(), color)
} else {
("".into(), Tui::g(64).into())
("".into(), ItemTheme::G[64].into())
};
let time: String = self.pulses_since_start_looped()
field_v(color, "Now:", format!("{} {}", self.play_status_time(), name))
}
fn play_status_time (&self) -> String {
self.pulses_since_start_looped()
.map(|(times, time)|format!("{:>3}x {:>}", times+1.0, self.clock().timebase.format_beats_1(time)))
.unwrap_or_else(||String::from(" ")).into();
field_v(color, "Now:", format!("{} {}", time, name))
.unwrap_or_else(||String::from(" "))
.into()
}
fn next_status (&self) -> impl Draw<Tui> {