mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
remove old input macros
This commit is contained in:
parent
6fd87ce4ed
commit
ca1fb3c414
11 changed files with 218 additions and 247 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use crate::*;
|
||||
|
||||
handle!(TuiIn: |self: SamplerTui, input|SamplerTuiCommand::execute_with_state(self, input.event()));
|
||||
//handle!(TuiIn: |self: SamplerTui, input|SamplerTuiCommand::execute_with_state(self, input.event()));
|
||||
|
||||
#[derive(Clone, Debug)] pub enum SamplerTuiCommand {
|
||||
Import(FileBrowserCommand),
|
||||
|
|
@ -37,18 +37,18 @@ command!(|self:FileBrowserCommand,state:SamplerTui|match self {
|
|||
_ => todo!()
|
||||
});
|
||||
|
||||
input_to_command!(SamplerTuiCommand: |state: SamplerTui, input: Event|match state.mode{
|
||||
Some(SamplerMode::Import(..)) => Self::Import(
|
||||
FileBrowserCommand::input_to_command(state, input)?
|
||||
),
|
||||
_ => match input {
|
||||
// load sample
|
||||
kpat!(Shift-Char('L')) => Self::Import(FileBrowserCommand::Begin),
|
||||
kpat!(KeyCode::Up) => Self::Select(state.note_point().overflowing_add(1).0.min(127)),
|
||||
kpat!(KeyCode::Down) => Self::Select(state.note_point().overflowing_sub(1).0.min(127)),
|
||||
_ => return None
|
||||
}
|
||||
});
|
||||
//input_to_command!(SamplerTuiCommand: |state: SamplerTui, input: Event|match state.mode{
|
||||
//Some(SamplerMode::Import(..)) => Self::Import(
|
||||
//FileBrowserCommand::input_to_command(state, input)?
|
||||
//),
|
||||
//_ => match input {
|
||||
//// load sample
|
||||
//kpat!(Shift-Char('L')) => Self::Import(FileBrowserCommand::Begin),
|
||||
//kpat!(KeyCode::Up) => Self::Select(state.note_point().overflowing_add(1).0.min(127)),
|
||||
//kpat!(KeyCode::Down) => Self::Select(state.note_point().overflowing_sub(1).0.min(127)),
|
||||
//_ => return None
|
||||
//}
|
||||
//});
|
||||
|
||||
command!(|self: SamplerTuiCommand, state: SamplerTui|match self {
|
||||
Self::Import(FileBrowserCommand::Begin) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue