mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
exit dos mode
This commit is contained in:
parent
3ba5e253b0
commit
625956766e
4 changed files with 9 additions and 13 deletions
|
|
@ -2,12 +2,8 @@ use crate::prelude::*;
|
|||
use super::*;
|
||||
pub fn handle (state: &mut Launcher, event: &AppEvent) -> Usually<bool> {
|
||||
Ok(handle_keymap(state, event, KEYMAP)? || match state.view {
|
||||
LauncherView::Modal(ref mut device) => {
|
||||
device.handle(event)?
|
||||
},
|
||||
LauncherView::Tracks => {
|
||||
handle_keymap(state, event, KEYMAP_TRACKS)?
|
||||
},
|
||||
LauncherView::Modal(ref mut device) => device.handle(event)?,
|
||||
LauncherView::Tracks => handle_keymap(state, event, KEYMAP_TRACKS)?,
|
||||
LauncherView::Sequencer => {
|
||||
let i = state.col().saturating_sub(1);
|
||||
if let Some(track) = state.tracks.get_mut(i) {
|
||||
|
|
|
|||
|
|
@ -172,8 +172,8 @@ pub fn process (state: &mut Launcher, _: &Client, _: &ProcessScope) -> Control {
|
|||
Control::Continue
|
||||
}
|
||||
pub fn render (state: &Launcher, buf: &mut Buffer, mut area: Rect) -> Usually<Rect> {
|
||||
area.width = 80;
|
||||
area.height = 25;
|
||||
//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);
|
||||
|
|
@ -183,10 +183,10 @@ pub fn render (state: &Launcher, buf: &mut Buffer, mut area: Rect) -> Usually<Re
|
|||
draw_timer(buf, x + width - 1, y, &state.timebase, state.position);
|
||||
let mut y = y + 1;
|
||||
y = y + LauncherGridView::new(
|
||||
state, buf, Rect { x, y, width, height: 8 }, state.view.is_tracks()
|
||||
state, buf, Rect { x, y, width, height: height / 3 }, state.view.is_tracks()
|
||||
).draw()?.height;
|
||||
y = y + draw_section_sequencer(state, buf, Rect { x, y, width, height: 8 })?.height;
|
||||
y = y + draw_section_chains(state, buf, Rect { x, y, width, height: 8 })?.height;
|
||||
y = y + draw_section_sequencer(state, buf, Rect { x, y, width, height: height / 3 })?.height;
|
||||
y = y + draw_section_chains(state, buf, Rect { x, y, width, height: height /3 })?.height;
|
||||
area.height = y;
|
||||
if state.show_help {
|
||||
let style = Some(Style::default().bold().white().not_dim().on_black().italic());
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ pub fn lanes (
|
|||
format!("{}", step / time_zoom / 4 + 1)
|
||||
.blit(buf, x as u16, y - 1, Some(Style::default().bold().not_dim()));
|
||||
}
|
||||
let h = (note1-note0)/2 - y as u32;
|
||||
let h = ((note1-note0)/2).saturating_sub(y as u32);
|
||||
for k in 0..h {
|
||||
let (character, style) = match (
|
||||
contains_note_on(phrase, u7::from_int_lossy((note0 + k * 2 + 0) as u8), a, b),
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ fn main () -> Result<(), Box<dyn Error>> {
|
|||
]))),
|
||||
]))?,
|
||||
|
||||
Track::new("Helm", &timebase, Some(vec![
|
||||
Track::new("Odin2", &timebase, Some(vec![
|
||||
//Plugin::lv2("Helm", "file:///home/user/.lv2/Helm.lv2", &[1, 0, 0, 2])?.boxed(),
|
||||
Plugin::lv2("Odin2", "file:///home/user/.lv2/Odin2.lv2", &[1, 0, 0, 2])?.boxed(),
|
||||
]), Some(vec![
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue