From 6b073988c23c89740c014f6315f7209420950c16 Mon Sep 17 00:00:00 2001 From: unspeaker Date: Thu, 2 Jan 2025 14:01:14 +0100 Subject: [PATCH] wip: reenabling editor --- src/groovebox.rs | 2 +- src/midi/midi_editor.rs | 2 +- src/piano/piano_h.rs | 31 +++++++++++++++++++++++++++++-- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/groovebox.rs b/src/groovebox.rs index d46c3457..adf130a2 100644 --- a/src/groovebox.rs +++ b/src/groovebox.rs @@ -143,7 +143,7 @@ render!(Tui: (self: Groovebox) => { ))), Bsp::n( MidiEditStatus(&self.editor), - Fill::xy(&self.editor), + &self.editor, ), ), )) diff --git a/src/midi/midi_editor.rs b/src/midi/midi_editor.rs index e1329847..612eda0e 100644 --- a/src/midi/midi_editor.rs +++ b/src/midi/midi_editor.rs @@ -45,7 +45,7 @@ has_size!(|self: MidiEditor|&self.size); render!(Tui: (self: MidiEditor) => { self.autoscroll(); self.autozoom(); - Bsp::a(&self.size, &self.mode) + Fill::xy(Tui::bg(Color::Black, Bsp::b(&self.size, &self.mode))) }); impl MidiView for MidiEditor {} diff --git a/src/piano/piano_h.rs b/src/piano/piano_h.rs index bc806ba9..6272b886 100644 --- a/src/piano/piano_h.rs +++ b/src/piano/piano_h.rs @@ -20,9 +20,36 @@ render!(Tui: (self: PianoHorizontal) => { let timeline = move||PianoHorizontalTimeline(self); let notes = move||PianoHorizontalNotes(self); let cursor = move||PianoHorizontalCursor(self); - Outer(Style::default().fg(self.color.dark.rgb).bg(self.color.darkest.rgb)).enclose("kyp"); + let status = move||row!( + //" ", + row!("Edit:", name.to_string()), " ", + row!("Length:", length.to_string()), " ", + row!("Loop:", looped.to_string()) + ); + Bsp::s( + Fixed::y(1, status()), + Bsp::s( + Fixed::y(1, Bsp::e( + Fixed::x(self.keys_width, ""), + Fill::x(timeline()), + )), + Fill::xy(Bsp::e( + Fixed::x(self.keys_width, keys()), + Fill::xy("test") + //Fill::xy(lay!( + //&self.size, + //Fill::xy(lay!( + //Fill::xy(notes()), + //Fill::xy(cursor()), + //)) + //)), + )), + ) + ) + //"kyp" + //Outer(Style::default().fg(self.color.dark.rgb).bg(self.color.darkest.rgb)).enclose("kyp"); //with_border(lay!( - //Push::x(0, row!( + //row!( ////" ", //field("Edit:", name.to_string()), " ", //field("Length:", length.to_string()), " ",