almost sane focus higlighting

This commit is contained in:
🪞👃🪞 2024-06-26 00:22:42 +03:00
parent 4c9eed6fce
commit c06b9d16e2
4 changed files with 30 additions and 31 deletions

View file

@ -13,7 +13,7 @@ pub fn draw (
timer(s, buf, x, y, beat);
let height = 32.max(s.note_axis.1 - s.note_axis.0) / 2;
lanes(s, buf, x, y, width);
cursor(s, buf, x, y);
cursor(s, buf, x, y, Style::default().green().not_dim());
footer(s, buf, x, y, width, height);
Ok(Rect {
x: x - 13,
@ -94,12 +94,12 @@ pub fn lanes (s: &Sequencer, buf: &mut Buffer, x: u16, y: u16, width: u16) {
}
}
pub fn cursor (s: &Sequencer, buf: &mut Buffer, x: u16, y: u16) {
pub fn cursor (s: &Sequencer, buf: &mut Buffer, x: u16, y: u16, style: Style) {
buf.set_string(
x + 5 + s.time_cursor,
y + s.note_cursor / 2,
if s.note_cursor % 2 == 0 { "" } else { "" },
Style::default().green().not_dim()
style
);
}