mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +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
|
|
@ -6,17 +6,27 @@ pub use self::jack::*;
|
|||
pub use self::render::*;
|
||||
use crate::prelude::*;
|
||||
|
||||
pub struct Transport;
|
||||
pub const ACTIONS: [(&'static str, &'static str);2] = [
|
||||
("(Shift-)Tab, Arrows ", "Navigate"),
|
||||
//("Home", "⏹ Stop and rewind"),
|
||||
("(Shift-)Space", "⏮ Play/pause"),
|
||||
];
|
||||
|
||||
pub struct Transport {
|
||||
exited: bool
|
||||
}
|
||||
|
||||
impl Transport {
|
||||
pub fn new () -> Result<Self, Box<dyn Error>> {
|
||||
Ok(Self)
|
||||
Ok(Self { exited: false })
|
||||
}
|
||||
}
|
||||
|
||||
const ACTIONS: [(&'static str, &'static str);3] = [
|
||||
("Tab/Shift-Tab, Arrows", "Navigate"),
|
||||
//("Home", "⏹ Stop and rewind"),
|
||||
("Space", "⏮ Play from cursor/pause"),
|
||||
("Shift-Space", "⯈ Play from start/rewind"),
|
||||
];
|
||||
impl Exitable for Transport {
|
||||
fn exit (&mut self) {
|
||||
self.exited = true
|
||||
}
|
||||
fn exited (&self) -> bool {
|
||||
self.exited
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue