sequencer time indicator

This commit is contained in:
🪞👃🪞 2024-06-29 15:29:49 +03:00
parent 4ebecc2427
commit e13569df93
5 changed files with 68 additions and 40 deletions

View file

@ -17,6 +17,13 @@ impl<'a> LauncherGridView<'a> {
self.separator_h(2, false);
self.separator_h((self.state.cursor.1 * 2) as u16, true);
self.separator_h(((self.state.cursor.1 + 1) * 2) as u16, true);
draw_box_styled(self.buf, self.area, Some(
if self.focused {
Style::default().green().dim()
} else {
Style::default().dim()
}
));
let columns = self.column_names();
let (mut x, y) = (self.area.x, self.area.y);
@ -47,7 +54,6 @@ impl<'a> LauncherGridView<'a> {
}
"Add track…".blit(self.buf, x + 2, y + 1, Some(Style::default().dim()));
draw_box_styled(self.buf, self.area, Some(self.highlight(self.focused)));
Ok(self.area)
}
@ -135,7 +141,14 @@ impl<'a> LauncherGridView<'a> {
}
y2 = y2 + 1;
}
let hi = (track + 1 == self.state.cursor.0) &&
(self.state.scenes.len() + 1 == self.state.cursor.1);
" + Add clip".blit(self.buf, x, y + y2, Some(Style::default().dim()));
if hi {
draw_box_styled(
self.buf, Rect { x: x - 2, y: y + y2 - 1, width: 16, height: 3 }, Some(Style::default().green())
);
}
}
fn highlight (&self, highlight: bool) -> Style {