mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
modularize core
This commit is contained in:
parent
a4061535b5
commit
2837ffff4a
43 changed files with 629 additions and 770 deletions
|
|
@ -1,12 +1,13 @@
|
|||
use crate::prelude::*;
|
||||
use crate::core::*;
|
||||
use crate::layout::*;
|
||||
use crate::device::*;
|
||||
mod grid;
|
||||
pub use self::grid::*;
|
||||
mod handle;
|
||||
pub use self::grid::*; mod handle;
|
||||
pub use self::handle::*;
|
||||
pub struct Launcher {
|
||||
name: String,
|
||||
timebase: Arc<Timebase>,
|
||||
transport: Transport,
|
||||
transport: ::jack::Transport,
|
||||
playing: TransportState,
|
||||
monitoring: bool,
|
||||
recording: bool,
|
||||
|
|
@ -185,10 +186,10 @@ pub fn render (state: &Launcher, buf: &mut Buffer, mut area: Rect) -> Usually<Re
|
|||
//area.width = 80; // DOS mode
|
||||
//area.height = 25;
|
||||
let Rect { x, y, width, height } = area;
|
||||
crate::device::sequencer::draw_play_stop(buf, x + 1, y, &state.playing);
|
||||
crate::device::sequencer::draw_rec(buf, x + 12, y, state.recording);
|
||||
crate::device::sequencer::draw_mon(buf, x + 19, y, state.monitoring);
|
||||
crate::device::sequencer::draw_dub(buf, x + 26, y, state.overdub);
|
||||
crate::device::transport::draw_play_stop(buf, x + 1, y, &state.playing);
|
||||
crate::device::transport::draw_rec(buf, x + 12, y, state.recording);
|
||||
crate::device::transport::draw_mon(buf, x + 19, y, state.monitoring);
|
||||
crate::device::transport::draw_dub(buf, x + 26, y, state.overdub);
|
||||
draw_bpm(buf, x + 33, y, state.timebase.tempo());
|
||||
draw_timer(buf, x + width - 1, y, &state.timebase, state.position);
|
||||
let mut y = y + 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue