Feat: introduce follow up actions
This commit is contained in:
@@ -24,26 +24,37 @@ pub enum PatternPropsField {
|
||||
Speed,
|
||||
Quantization,
|
||||
SyncMode,
|
||||
FollowUp,
|
||||
ChainBank,
|
||||
ChainPattern,
|
||||
}
|
||||
|
||||
impl PatternPropsField {
|
||||
pub fn next(&self) -> Self {
|
||||
pub fn next(&self, follow_up_is_chain: bool) -> Self {
|
||||
match self {
|
||||
Self::Name => Self::Length,
|
||||
Self::Length => Self::Speed,
|
||||
Self::Speed => Self::Quantization,
|
||||
Self::Quantization => Self::SyncMode,
|
||||
Self::SyncMode => Self::SyncMode,
|
||||
Self::SyncMode => Self::FollowUp,
|
||||
Self::FollowUp if follow_up_is_chain => Self::ChainBank,
|
||||
Self::FollowUp => Self::FollowUp,
|
||||
Self::ChainBank => Self::ChainPattern,
|
||||
Self::ChainPattern => Self::ChainPattern,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn prev(&self) -> Self {
|
||||
pub fn prev(&self, follow_up_is_chain: bool) -> Self {
|
||||
match self {
|
||||
Self::Name => Self::Name,
|
||||
Self::Length => Self::Name,
|
||||
Self::Speed => Self::Length,
|
||||
Self::Quantization => Self::Speed,
|
||||
Self::SyncMode => Self::Quantization,
|
||||
Self::FollowUp => Self::SyncMode,
|
||||
Self::ChainBank => Self::FollowUp,
|
||||
Self::ChainPattern if follow_up_is_chain => Self::ChainBank,
|
||||
Self::ChainPattern => Self::FollowUp,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user