mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
vertical scroll sequencer, pt.2
This commit is contained in:
parent
767b9ff983
commit
1ce5ab6f27
2 changed files with 20 additions and 4 deletions
|
|
@ -90,10 +90,26 @@ impl Handle<Tui> for PhraseEditor<Tui> {
|
|||
key!(KeyCode::Char('`')) => { self.mode = !self.mode; },
|
||||
key!(KeyCode::Enter) => { self.entered = true; },
|
||||
key!(KeyCode::Esc) => { self.entered = false; },
|
||||
key!(KeyCode::PageUp) => { self.note_axis.write().unwrap().start_dec(3); },
|
||||
key!(KeyCode::PageDown) => { self.note_axis.write().unwrap().start_inc(3); },
|
||||
key!(KeyCode::PageUp) => {
|
||||
let mut axis = self.note_axis.write().unwrap();
|
||||
axis.start_dec(3);
|
||||
axis.point_dec(3);
|
||||
},
|
||||
key!(KeyCode::PageDown) => {
|
||||
let mut axis = self.note_axis.write().unwrap();
|
||||
axis.start_inc(3);
|
||||
axis.point_inc(3);
|
||||
},
|
||||
key!(KeyCode::Up) => match self.entered {
|
||||
true => { self.note_axis.write().unwrap().point_dec(1); },
|
||||
true => {
|
||||
let mut axis = self.note_axis.write().unwrap();
|
||||
axis.point_dec(1);
|
||||
if let Some(point) = axis.point {
|
||||
if point < axis.start {
|
||||
axis.start = point;
|
||||
}
|
||||
}
|
||||
},
|
||||
false => { self.note_axis.write().unwrap().start_dec(1); },
|
||||
},
|
||||
key!(KeyCode::Down) => match self.entered {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue