errors fixed, renders nothing :(

This commit is contained in:
🪞👃🪞 2024-09-07 18:43:24 +03:00
parent b3f0f60400
commit 4cca03352a
9 changed files with 47 additions and 44 deletions

View file

@ -5,19 +5,16 @@ impl Sequencer {
const H_KEYS_OFFSET: usize = 5;
pub(crate) fn horizontal_draw <'a> (&self, to: &mut Tui) -> Usually<()> {
let mut area = to.area();
let area = to.area();
Split::down()
.add_ref(&SequenceName(&self))
.add_ref(&SequenceRange)
.add_ref(&SequenceLoopRange)
.add_ref(&SequenceNoteRange)
.render(to.with_area(area.x(), area.y(), area.h(), 10))?;
area.x = area.x() + 10;
area.width = area.w().saturating_sub(10);
area.height = area.h().min(66);
.render(to.with_area(area.x(), area.y(), 10, area.h()))?;
let area = [area.x() + 10, area.y(), area.w().saturating_sub(10), area.h().min(66)];
Lozenge(Style::default().fg(Nord::BG2)).draw(to.with_rect(area))?;
area.x = area.x() + 1;
area.width = area.w().saturating_sub(1);
let area = [area.x() + 1, area.y(), area.w().saturating_sub(1), area.h()];
Layered::new()
.add_ref(&SequenceKeys(&self))
.add_ref(&self.phrase.as_ref().map(|phrase|SequenceTimer(&self, phrase.clone())))