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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::model::{LaunchQuantization, PatternSpeed, SyncMode};
|
||||
use crate::model::{FollowUp, LaunchQuantization, PatternSpeed, SyncMode};
|
||||
use crate::state::editor::{EuclideanField, PatternField, PatternPropsField};
|
||||
use crate::state::file_browser::FileBrowserState;
|
||||
|
||||
@@ -77,6 +77,7 @@ pub enum Modal {
|
||||
speed: PatternSpeed,
|
||||
quantization: LaunchQuantization,
|
||||
sync_mode: SyncMode,
|
||||
follow_up: FollowUp,
|
||||
},
|
||||
KeybindingsHelp {
|
||||
scroll: usize,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::engine::PatternChange;
|
||||
use crate::model::{LaunchQuantization, PatternSpeed, SyncMode};
|
||||
use crate::model::{FollowUp, LaunchQuantization, PatternSpeed, SyncMode};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -21,6 +21,7 @@ pub struct StagedPropChange {
|
||||
pub speed: PatternSpeed,
|
||||
pub quantization: LaunchQuantization,
|
||||
pub sync_mode: SyncMode,
|
||||
pub follow_up: FollowUp,
|
||||
}
|
||||
|
||||
pub struct PlaybackState {
|
||||
|
||||
Reference in New Issue
Block a user