use def_command

This commit is contained in:
🪞👃🪞 2025-08-23 23:20:15 +03:00
parent 5ccbb9719f
commit cfd19062fd
37 changed files with 1578 additions and 1594 deletions

View file

@ -10,17 +10,19 @@ impl MidiClip {
fn _todo_opt_item_theme_stub (&self) -> Option<ItemTheme> { todo!() }
}
#[tengri_proc::command(MidiClip)]
impl ClipCommand {
fn set_color (clip: &mut MidiClip, color: Option<ItemTheme>) -> Perhaps<Self> {
def_command!(ClipCommand: |clip: MidiClip| {
SetColor { color: Option<ItemTheme> } => {
//(SetColor [t: usize, s: usize, c: ItemTheme]
//clip.clip_set_color(t, s, c).map(|o|Self::SetColor(t, s, o)))));
//("color" [a: usize, b: usize] Some(Self::SetColor(a.unwrap(), b.unwrap(), ItemTheme::random())))
todo!()
}
fn set_loop (clip: &mut MidiClip, looping: Option<bool>) -> Perhaps<Self> {
},
SetLoop { looping: Option<bool> } => {
//(SetLoop [t: usize, s: usize, l: bool] cmd_todo!("\n\rtodo: {self:?}"))
//("loop" [a: usize, b: usize, c: bool] Some(Self::SetLoop(a.unwrap(), b.unwrap(), c.unwrap())))
todo!()
}
}
});