mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-08-28 21:06:56 +02:00
183e...
This commit is contained in:
parent
790e33b40c
commit
9283c54eec
4 changed files with 47 additions and 44 deletions
|
|
@ -215,15 +215,6 @@ impl ClipLength {
|
|||
pub fn ticks (&self) -> usize {
|
||||
self.pulses % self.ppq
|
||||
}
|
||||
pub fn bars_string (&self) -> Arc<str> {
|
||||
format!("{}", self.bars()).into()
|
||||
}
|
||||
pub fn beats_string (&self) -> Arc<str> {
|
||||
format!("{}", self.beats()).into()
|
||||
}
|
||||
pub fn ticks_string (&self) -> Arc<str> {
|
||||
format!("{:>02}", self.ticks()).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl Pool {
|
||||
|
|
@ -272,14 +263,14 @@ impl<'a> PoolView<'a> {
|
|||
impl ClipLength {
|
||||
fn tui (&self) -> impl Draw<Tui> {
|
||||
use ClipLengthFocus::*;
|
||||
let bars = ||self.bars_string();
|
||||
let beats = ||self.beats_string();
|
||||
let ticks = ||self.ticks_string();
|
||||
let bars = format!("{}", self.bars());
|
||||
let beats = format!("{}", self.beats());
|
||||
let ticks = format!("{:>02}", self.ticks());
|
||||
match self.focus {
|
||||
None => east!(" ", bars(), ".", beats(), ".", ticks()),
|
||||
Some(Bar) => east!("[", bars(), "]", beats(), ".", ticks()),
|
||||
Some(Beat) => east!(" ", bars(), "[", beats(), "]", ticks()),
|
||||
Some(Tick) => east!(" ", bars(), ".", beats(), "[", ticks()),
|
||||
None => east!(" ", bars, ".", beats, ".", ticks),
|
||||
Some(Bar) => east!("[", bars, "]", beats, ".", ticks),
|
||||
Some(Beat) => east!(" ", bars, "[", beats, "]", ticks),
|
||||
Some(Tick) => east!(" ", bars, ".", beats, "[", ticks),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue