mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
change Device from trait to enum
This commit is contained in:
parent
866d88c8ec
commit
1cc3a58826
8 changed files with 150 additions and 92 deletions
|
|
@ -6,20 +6,6 @@ provide!(f32: |self: Sampler| {});
|
|||
provide!(u7: |self: Sampler| {});
|
||||
provide!(usize: |self: Sampler| {});
|
||||
|
||||
//handle!(TuiIn: |self: Sampler, input|SamplerCommand::execute_with_state(self, input.event()));
|
||||
//input_to_command!(SamplerCommand: |state: Sampler, 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_pos().overflowing_add(1).0.min(127)),
|
||||
//kpat!(KeyCode::Down) => Self::Select(state.note_pos().overflowing_sub(1).0.min(127)),
|
||||
//_ => return None
|
||||
//}
|
||||
//});
|
||||
|
||||
defcom! { |self, state: Sampler|
|
||||
|
||||
SamplerCommand {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
use crate::*;
|
||||
|
||||
impl Sampler {
|
||||
pub fn view_grid (&self) -> impl Content<TuiOut> {
|
||||
"sampler grid view"
|
||||
}
|
||||
}
|
||||
|
||||
content!(TuiOut: |self: Sampler| {
|
||||
let keys_width = 5;
|
||||
let keys = move||"";//SamplerKeys(self);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue