sweeeeping sweep

This commit is contained in:
🪞👃🪞 2024-12-31 04:12:09 +01:00
parent c9b09b7dea
commit e677d1d7d4
38 changed files with 766 additions and 691 deletions

View file

@ -69,20 +69,20 @@ impl PhraseLengthFocus {
}
}
render!(<Tui>|self: PhraseLength|{
render!(Tui: (self: PhraseLength) => {
let bars = ||self.bars_string();
let beats = ||self.beats_string();
let ticks = ||self.ticks_string();
row!(move|add|match self.focus {
match self.focus {
None =>
add(&row!([" ", bars(), ".", beats(), ".", ticks()])),
row!(" ", bars(), ".", beats(), ".", ticks()),
Some(PhraseLengthFocus::Bar) =>
add(&row!(["[", bars(), "]", beats(), ".", ticks()])),
row!("[", bars(), "]", beats(), ".", ticks()),
Some(PhraseLengthFocus::Beat) =>
add(&row!([" ", bars(), "[", beats(), "]", ticks()])),
row!(" ", bars(), "[", beats(), "]", ticks()),
Some(PhraseLengthFocus::Tick) =>
add(&row!([" ", bars(), ".", beats(), "[", ticks()])),
})
row!(" ", bars(), ".", beats(), "[", ticks()),
}
});
#[derive(Copy, Clone, Debug, PartialEq)]

View file

@ -8,7 +8,7 @@ pub struct PhraseSelector {
}
// TODO: Display phrases always in order of appearance
render!(<Tui>|self: PhraseSelector|Fixed::xy(24, 1, row!([
render!(Tui: (self: PhraseSelector) => Fixed::xy(24, 1, row!([
Tui::fg(self.color.lightest.rgb, Tui::bold(true, &self.title)),
Tui::fg_bg(self.color.lighter.rgb, self.color.base.rgb, row!([
format!("{:8}", &self.name[0..8.min(self.name.len())]),