tek/crates/tek_sequencer/src/transport_focus.rs

23 lines
537 B
Rust

use crate::*;
#[derive(PartialEq)]
/// Which section of the transport is focused
pub enum TransportFocus { BPM, Quant, Sync }
impl TransportFocus {
pub fn prev (&mut self) {
*self = match self {
Self::BPM => Self::Sync,
Self::Quant => Self::BPM,
Self::Sync => Self::Quant,
}
}
pub fn next (&mut self) {
*self = match self {
Self::BPM => Self::Quant,
Self::Quant => Self::Sync,
Self::Sync => Self::BPM,
}
}
}