LineBuffer

This commit is contained in:
🪞👃🪞 2024-07-06 22:07:23 +03:00
parent 61af72c281
commit d75600188e
3 changed files with 92 additions and 3 deletions

View file

@ -13,8 +13,8 @@ pub struct TransportView<'a> {
impl<'a> Render for TransportView<'a> {
fn render (&self, buf: &mut Buffer, area: Rect) -> Usually<Rect> {
let Rect { x, y, width, .. } = area;
draw_play_stop(buf, x + 1, y, &self.playing);
if width > 100 {
draw_play_stop(buf, x + 1, y, &self.playing);
draw_rec(buf, x + 12, y, self.record);
draw_dub(buf, x + 19, y, self.overdub);
draw_mon(buf, x + 26, y, self.monitor);
@ -26,7 +26,6 @@ impl<'a> Render for TransportView<'a> {
);
Ok(Rect { x, y, width, height: 1 })
} else {
draw_play_stop(buf, x + 1, y, &self.playing);
draw_bpm(buf, x + 12, y, self.timebase.bpm() as usize, self.quant);
draw_timer(buf, x + width - 1, y,
self.timebase.ppq() as usize,