compact launch grid

This commit is contained in:
🪞👃🪞 2024-06-29 20:46:57 +03:00
parent fad0caef88
commit 3886e34519
5 changed files with 75 additions and 90 deletions

View file

@ -88,7 +88,7 @@ pub fn lanes (
format!("{}", step / time_zoom / 4 + 1)
.blit(buf, x as u16, y - 1, Some(Style::default().bold().not_dim()));
}
let h = (note1-note0)/2;
let h = (note1-note0)/2 - y as u32;
for k in 0..h {
let (character, style) = match (
contains_note_on(phrase, u7::from_int_lossy((note0 + k * 2 + 0) as u8), a, b),
@ -99,7 +99,7 @@ pub fn lanes (
(false, true) => ("", wh),
(false, false) => ("·", bw),
};
let y = y as u32 + h + k;
let y = y as u32 + k;
character.blit(buf, x as u16, y as u16, Some(style));
}
}