make transport focusable

This commit is contained in:
🪞👃🪞 2024-07-12 13:23:32 +03:00
parent a7a798b484
commit 449615eea8
14 changed files with 220 additions and 237 deletions

View file

@ -217,21 +217,23 @@ impl App {
}
#[derive(PartialEq, Clone, Copy)]
pub enum AppSection { Arranger, Sequencer, Chain, }
pub enum AppSection { Transport, Arranger, Sequencer, Chain, }
impl Default for AppSection { fn default () -> Self { Self::Arranger } }
impl AppSection {
pub fn prev (&mut self) {
*self = match self {
Self::Arranger => Self::Chain,
Self::Transport => Self::Chain,
Self::Arranger => Self::Transport,
Self::Sequencer => Self::Arranger,
Self::Chain => Self::Sequencer,
Self::Chain => Self::Sequencer,
}
}
pub fn next (&mut self) {
*self = match self {
Self::Arranger => Self::Sequencer,
Self::Transport => Self::Arranger,
Self::Arranger => Self::Sequencer,
Self::Sequencer => Self::Chain,
Self::Chain => Self::Arranger,
Self::Chain => Self::Transport,
}
}
}