So much better
This commit is contained in:
@@ -12,6 +12,38 @@ pub enum PatternField {
|
||||
Speed,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Default)]
|
||||
pub enum PatternPropsField {
|
||||
#[default]
|
||||
Name,
|
||||
Length,
|
||||
Speed,
|
||||
Quantization,
|
||||
SyncMode,
|
||||
}
|
||||
|
||||
impl PatternPropsField {
|
||||
pub fn next(&self) -> Self {
|
||||
match self {
|
||||
Self::Name => Self::Length,
|
||||
Self::Length => Self::Speed,
|
||||
Self::Speed => Self::Quantization,
|
||||
Self::Quantization => Self::SyncMode,
|
||||
Self::SyncMode => Self::SyncMode,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn prev(&self) -> Self {
|
||||
match self {
|
||||
Self::Name => Self::Name,
|
||||
Self::Length => Self::Name,
|
||||
Self::Speed => Self::Length,
|
||||
Self::Quantization => Self::Speed,
|
||||
Self::SyncMode => Self::Quantization,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct EditorContext {
|
||||
pub bank: usize,
|
||||
pub pattern: usize,
|
||||
|
||||
Reference in New Issue
Block a user