mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-07-17 15:56:57 +02:00
109e...
This commit is contained in:
parent
b44dc635ef
commit
80fe958476
8 changed files with 69 additions and 45 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue