mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
connect track 1 to output; reenable switching scenes/phrases
This commit is contained in:
parent
8e6d9fcdd4
commit
f2774e67a6
3 changed files with 79 additions and 21 deletions
|
|
@ -232,7 +232,43 @@ fn clip_prev (_: &mut App) -> Usually<bool> { Ok(true) }
|
|||
//Ok(true)
|
||||
//}
|
||||
|
||||
fn activate (_: &mut App) -> Usually<bool> { Ok(true) }
|
||||
fn delete (app: &mut App) -> Usually<bool> {
|
||||
match app.section {
|
||||
0 => delete_track(app),
|
||||
_ => Ok(false)
|
||||
}
|
||||
}
|
||||
|
||||
fn enter (app: &mut App) -> Usually<bool> {
|
||||
if app.entered {
|
||||
activate(app)
|
||||
} else {
|
||||
app.entered = true;
|
||||
Ok(true)
|
||||
}
|
||||
}
|
||||
|
||||
fn activate (app: &mut App) -> Usually<bool> {
|
||||
Ok(match app.section {
|
||||
0 => {
|
||||
if app.scene_cursor == 0 {
|
||||
false
|
||||
} else {
|
||||
let scene = &app.scenes[app.scene_cursor - 1];
|
||||
if app.track_cursor == 0 {
|
||||
for (i, track) in app.tracks.iter_mut().enumerate() {
|
||||
track.sequence = scene.clips[i];
|
||||
}
|
||||
} else {
|
||||
let track = &mut app.tracks[app.track_cursor - 1];
|
||||
track.sequence = scene.clips[app.track_cursor - 1];
|
||||
};
|
||||
true
|
||||
}
|
||||
},
|
||||
_ => false
|
||||
})
|
||||
}
|
||||
//fn activate (_: &mut Launcher) -> Usually<bool> {
|
||||
//unimplemented!();
|
||||
////if let (
|
||||
|
|
@ -287,21 +323,6 @@ fn activate (_: &mut App) -> Usually<bool> { Ok(true) }
|
|||
//Ok(true)
|
||||
//}
|
||||
|
||||
fn delete (app: &mut App) -> Usually<bool> {
|
||||
match app.section {
|
||||
0 => delete_track(app),
|
||||
_ => Ok(false)
|
||||
}
|
||||
}
|
||||
|
||||
fn enter (app: &mut App) -> Usually<bool> {
|
||||
if app.entered {
|
||||
activate(app)
|
||||
} else {
|
||||
app.entered = true;
|
||||
Ok(true)
|
||||
}
|
||||
}
|
||||
|
||||
fn escape (app: &mut App) -> Usually<bool> {
|
||||
if app.entered {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue