load up to modes

the stacked modal music editor. lol
This commit is contained in:
🪞👃🪞 2025-08-10 14:22:22 +03:00
parent b991a49ad7
commit 4d4c470a81
7 changed files with 220 additions and 205 deletions

View file

@ -2,7 +2,14 @@ use crate::*;
#[derive(Debug)]
pub enum AppCommand {}
handle!(TuiIn:|self: App, input|{
panic!("{input:?}");
panic!("wat: {:?}", self.profile);
for keys in self.profile.mode.keys.iter() {
panic!("{keys} {:?}", self.config.binds.read().unwrap());
if let Some(binding) = self.config.binds.read().unwrap().get(keys.as_ref()) {
panic!("{binding:?}");
}
}
Ok(None)
//Ok(if let Some(binding) = self.profile.as_ref()
//.map(|c|c.keys.dispatch(input.event())).flatten()
//{
@ -95,12 +102,14 @@ dsl_exp!(|app: App| -> AppCommand {
["clock" / command: ClockCommand] => todo!(),
["sampler" / command: SamplerCommand] => todo!(),
["pool" / command: PoolCommand] => todo!(),
["pool" / editor: MidiEditCommand] => todo!(),
});
dsl_exp!(|app: App| -> DialogCommand {});
dsl_exp!(|app: App| -> ArrangementCommand {});
dsl_exp!(|app: App| -> ClockCommand {});
dsl_exp!(|app: App| -> SamplerCommand {});
dsl_exp!(|app: App| -> PoolCommand {});
dsl_exp!(|app: App| -> MidiEditCommand {});
//dsl_bind!(AppCommand: App {
//enqueue = |app, clip: Option<Arc<RwLock<MidiClip>>>| { todo!() };
//history = |app, delta: isize| { todo!() };