wip: p.52, e=5, collecting tui by layer p.2

This commit is contained in:
🪞👃🪞 2024-11-17 17:29:46 +01:00
parent 7b3c013aa7
commit 9b996878c2
31 changed files with 2005 additions and 2030 deletions

View file

@ -213,3 +213,31 @@ impl FocusGrid for ArrangerTui {
}
}
}
/// Focused field of `PhraseLength`
#[derive(Copy, Clone)]
pub enum PhraseLengthFocus {
/// Editing the number of bars
Bar,
/// Editing the number of beats
Beat,
/// Editing the number of ticks
Tick,
}
impl PhraseLengthFocus {
pub fn next (&mut self) {
*self = match self {
Self::Bar => Self::Beat,
Self::Beat => Self::Tick,
Self::Tick => Self::Bar,
}
}
pub fn prev (&mut self) {
*self = match self {
Self::Bar => Self::Tick,
Self::Beat => Self::Bar,
Self::Tick => Self::Beat,
}
}
}