wip3 (33e): ermh...

This commit is contained in:
🪞👃🪞 2024-12-09 17:31:31 +01:00
parent b028dc41a3
commit 1bb0107485
135 changed files with 590 additions and 654 deletions

View file

@ -0,0 +1,37 @@
use crate::*;
/// Different sections of the UI that may be focused.
#[derive(PartialEq, Clone, Copy)]
pub enum AppFocus {
/// The transport is selected.
Transport,
/// The arranger is selected.
Arranger,
/// The sequencer is selected.
Sequencer,
/// The device chain is selected.
Chain,
}
impl Default for AppFocus {
fn default () -> Self { Self::Arranger }
}
impl AppFocus {
pub fn prev (&mut self) {
*self = match self {
Self::Transport => Self::Chain,
Self::Arranger => Self::Transport,
Self::Sequencer => Self::Arranger,
Self::Chain => Self::Sequencer,
}
}
pub fn next (&mut self) {
*self = match self {
Self::Transport => Self::Arranger,
Self::Arranger => Self::Sequencer,
Self::Sequencer => Self::Chain,
Self::Chain => Self::Transport,
}
}
}