mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
use main loop with input everywhere
This commit is contained in:
parent
d6bf840a1f
commit
7dd5f7f488
16 changed files with 301 additions and 168 deletions
15
src/mixer.rs
15
src/mixer.rs
|
|
@ -11,14 +11,14 @@ use crate::prelude::*;
|
|||
// - If one stage clips, all stages after it are marked red
|
||||
// - If one track clips, all tracks that feed from it are marked red?
|
||||
|
||||
const ACTIONS: [(&'static str, &'static str);2] = [
|
||||
pub const ACTIONS: [(&'static str, &'static str);2] = [
|
||||
("+/-", "Adjust"),
|
||||
("Ins/Del", "Add/remove track"),
|
||||
];
|
||||
|
||||
pub struct Mixer {
|
||||
exited: bool,
|
||||
jack: Jack<Notifications>,
|
||||
exit: bool,
|
||||
tracks: Vec<Track>,
|
||||
selected_track: usize,
|
||||
selected_column: usize,
|
||||
|
|
@ -57,7 +57,7 @@ impl Mixer {
|
|||
)
|
||||
)?;
|
||||
Ok(Self {
|
||||
exit: false,
|
||||
exited: false,
|
||||
selected_column: 0,
|
||||
selected_track: 1,
|
||||
tracks: vec![
|
||||
|
|
@ -108,3 +108,12 @@ impl Track {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl Exitable for Mixer {
|
||||
fn exit (&mut self) {
|
||||
self.exited = true
|
||||
}
|
||||
fn exited (&self) -> bool {
|
||||
self.exited
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue