mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
but how to pass arbitrary chars to the config
This commit is contained in:
parent
f485a068a8
commit
19ed6a24b8
11 changed files with 627 additions and 644 deletions
|
|
@ -17,12 +17,12 @@ command!(|self: TrackCommand, state: App|match self { _ => todo!("track command"
|
|||
impl EdnCommand<App> for ClipCommand {
|
||||
fn from_edn <'a> (state: &App, head: &EdnItem<&str>, tail: &'a [EdnItem<String>]) -> Self {
|
||||
match (head, tail) {
|
||||
(Key("get"), [a, b ]) => Self::Get(0, 0),
|
||||
(Key("put"), [a, b, c ]) => Self::Put(0, 0, None),
|
||||
(Key("enqueue"), [a, b ]) => Self::Enqueue(0, 0),
|
||||
(Key("edit"), [a ]) => Self::Edit(None),
|
||||
(Key("loop"), [a, b, c ]) => Self::SetLoop(0, 0, true),
|
||||
(Key("color"), [a, b, c ]) => Self::SetColor(0, 0, ItemPalette::random()),
|
||||
(Sym("get"), [a, b ]) => Self::Get(0, 0),
|
||||
(Sym("put"), [a, b, c ]) => Self::Put(0, 0, None),
|
||||
(Sym("enqueue"), [a, b ]) => Self::Enqueue(0, 0),
|
||||
(Sym("edit"), [a ]) => Self::Edit(None),
|
||||
(Sym("loop"), [a, b, c ]) => Self::SetLoop(0, 0, true),
|
||||
(Sym("color"), [a, b, c ]) => Self::SetColor(0, 0, ItemPalette::random()),
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
|
@ -39,13 +39,13 @@ impl EdnCommand<App> for ClipCommand {
|
|||
impl EdnCommand<App> for SceneCommand {
|
||||
fn from_edn <'a> (state: &App, head: &EdnItem<&str>, tail: &'a [EdnItem<String>]) -> Self {
|
||||
match (head, tail) {
|
||||
(Key("add"), [ ]) => Self::Add,
|
||||
(Key("del"), [a ]) => Self::Del(0),
|
||||
(Key("swap"), [a, b ]) => Self::Swap(0, 0),
|
||||
(Key("size"), [a ]) => Self::SetSize(0),
|
||||
(Key("zoom"), [a, ]) => Self::SetZoom(0),
|
||||
(Key("color"), [a, b, ]) => Self::SetColor(0, ItemPalette::random()),
|
||||
(Key("enqueue"), [a, ]) => Self::Enqueue(0),
|
||||
(Sym("add"), [ ]) => Self::Add,
|
||||
(Sym("del"), [a ]) => Self::Del(0),
|
||||
(Sym("swap"), [a, b ]) => Self::Swap(0, 0),
|
||||
(Sym("size"), [a ]) => Self::SetSize(0),
|
||||
(Sym("zoom"), [a, ]) => Self::SetZoom(0),
|
||||
(Sym("color"), [a, b, ]) => Self::SetColor(0, ItemPalette::random()),
|
||||
(Sym("enqueue"), [a, ]) => Self::Enqueue(0),
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
|
@ -62,13 +62,13 @@ impl EdnCommand<App> for SceneCommand {
|
|||
impl EdnCommand<App> for TrackCommand {
|
||||
fn from_edn <'a> (state: &App, head: &EdnItem<&str>, tail: &'a [EdnItem<String>]) -> Self {
|
||||
match (head, tail) {
|
||||
(Key("add"), [ ]) => Self::Add,
|
||||
(Key("del"), [a ]) => Self::Del(0),
|
||||
(Key("stop"), [a ]) => Self::Stop(0),
|
||||
(Key("swap"), [a, b ]) => Self::Swap(0, 0),
|
||||
(Key("size"), [a ]) => Self::SetSize(0),
|
||||
(Key("zoom"), [a, ]) => Self::SetZoom(0),
|
||||
(Key("color"), [a, b, ]) => Self::SetColor(0, ItemPalette::random()),
|
||||
(Sym("add"), [ ]) => Self::Add,
|
||||
(Sym("del"), [a ]) => Self::Del(0),
|
||||
(Sym("stop"), [a ]) => Self::Stop(0),
|
||||
(Sym("swap"), [a, b ]) => Self::Swap(0, 0),
|
||||
(Sym("size"), [a ]) => Self::SetSize(0),
|
||||
(Sym("zoom"), [a, ]) => Self::SetZoom(0),
|
||||
(Sym("color"), [a, b, ]) => Self::SetColor(0, ItemPalette::random()),
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue