trait Run

This commit is contained in:
🪞👃🪞 2024-07-02 22:25:33 +03:00
parent cc2b59d772
commit 3ae2467acc
11 changed files with 212 additions and 141 deletions

View file

@ -1,8 +1,12 @@
use crate::core::*;
use super::*;
pub fn handle (state: &mut Launcher, event: &AppEvent) -> Usually<bool> {
//if let Some(ref modal) = state.modal {
//if modal.handle_with_state(state, event)? {
//return Ok(true)
//}
//}
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::Sequencer => {
let i = state.col().saturating_sub(1);