20 new errors rear their ugly heads

This commit is contained in:
🪞👃🪞 2024-09-05 23:19:53 +03:00
parent 92d747ba2a
commit e7f2284e5e
8 changed files with 167 additions and 174 deletions

View file

@ -3,7 +3,7 @@ include!("lib.rs");
use tek_core::clap::{self, Parser};
pub fn main () -> Usually<()> {
tek_core::run(Arc::new(RwLock::new(crate::ArrangerStandalone::from_args()?)))?;
Tui::run(Arc::new(RwLock::new(crate::ArrangerStandalone::from_args()?)))?;
Ok(())
}
@ -75,25 +75,26 @@ impl ArrangerStandalone {
}
}
impl Render for ArrangerStandalone {
fn render (&self, buf: &mut Buffer, area: Rect) -> Usually<Rect> {
impl Render<Tui> for ArrangerStandalone {
fn render (&self, to: &mut Tui) -> Perhaps<Rect> {
let area = to.area();
let sequencer = self.arranger.sequencer();
let result = Split::down()
.add_ref(&self.transport)
.add_ref(&self.arranger)
.add_ref(&sequencer)
//.focus(Some(self.focus))
.render(buf, area)?;
.render(to)?;
if let Some(ref modal) = self.arranger.modal {
fill_bg(buf, area, Nord::bg_lo(false, false));
fill_fg(buf, area, Nord::bg_hi(false, false));
modal.render(buf, area)?;
to.fill_bg(area, Nord::bg_lo(false, false));
to.fill_fg(area, Nord::bg_hi(false, false));
modal.render(to)?;
}
Ok(result)
}
}
impl Handle for ArrangerStandalone {
impl Handle<Tui> for ArrangerStandalone {
fn handle (&mut self, e: &AppEvent) -> Usually<bool> {
match e {
AppEvent::Input(Event::Key(KeyEvent { code: KeyCode::Char(' '), .. })) => {