mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
wip: p.57, e=81
This commit is contained in:
parent
0964ad3be4
commit
0c94c2af8f
11 changed files with 672 additions and 667 deletions
|
|
@ -11,7 +11,7 @@ pub enum PhrasePoolCommand {
|
|||
Delete(usize),
|
||||
Duplicate(usize),
|
||||
Swap(usize, usize),
|
||||
RandomColor(usize),
|
||||
Color(usize, ItemColor),
|
||||
Import(usize, String),
|
||||
Export(usize, String),
|
||||
SetName(usize, String),
|
||||
|
|
@ -38,10 +38,9 @@ impl<T: HasPhrases> Command<T> for PhrasePoolCommand {
|
|||
//view.phrase += 1;
|
||||
},
|
||||
Self::Swap(index, other) => {
|
||||
//Self::MoveUp => { view.move_up() },
|
||||
//Self::MoveDown => { view.move_down() },
|
||||
model.phrases_mut().swap(index, other);
|
||||
},
|
||||
Self::RandomColor(index) => {
|
||||
Self::Color(index, color) => {
|
||||
//view.phrase().write().unwrap().color = ItemColorTriplet::random();
|
||||
},
|
||||
Self::Import(index, path) => {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,12 @@ pub trait HasScenes<S: ArrangerSceneApi> {
|
|||
fn scene_default_name (&self) -> String {
|
||||
format!("Scene {}", self.scenes().len() + 1)
|
||||
}
|
||||
fn selected_scene (&self) -> Option<&S> {
|
||||
None
|
||||
}
|
||||
fn selected_scene_mut (&mut self) -> Option<&mut S> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
|
@ -86,6 +92,7 @@ pub trait ArrangerSceneApi: Sized {
|
|||
fn clip (&self, index: usize) -> Option<&Arc<RwLock<Phrase>>> {
|
||||
match self.clips().get(index) { Some(Some(clip)) => Some(clip), _ => None }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//impl ArrangerScene {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue