scene playing indicator

This commit is contained in:
🪞👃🪞 2024-07-12 20:01:40 +03:00
parent e605935698
commit 7d6bdcca99
2 changed files with 7 additions and 8 deletions

View file

@ -1,11 +1,7 @@
use crate::core::*;
#[derive(PartialEq)]
pub enum TransportFocus {
BPM,
Quant,
Sync,
}
pub enum TransportFocus { BPM, Quant, Sync }
impl TransportFocus {
pub fn prev (&mut self) {

View file

@ -62,7 +62,12 @@ impl<'a> ArrangerView<'a> {
(0 == self.cursor.0) && (scene_index + 1 == self.cursor.1)
).bold());
let y = 1 + y + 2 * scene_index as u16;
"".blit(buf, x+1, y, style)?;
let playing = scene.clips.iter().enumerate()
.all(|(track_index, phrase_index)|match phrase_index {
Some(i) => self.tracks[track_index].sequence == Some(*i),
None => true
});
if playing { "" } else { " " }.blit(buf, x+1, y, style)?;
scene.name.blit(buf, x + 2, y, style)?;
}
let width = 2 + self.scenes.iter()
@ -117,8 +122,6 @@ impl<'a> ArrangerView<'a> {
}
fn draw_horizontal (&self, buf: &mut Buffer, area: Rect) -> Usually<Rect> {
let style1 = Some(Style::default().bold().not_dim());
let style2 = Some(Style::default().not_dim());
let style3 = Some(Style::default().yellow().bold().not_dim());
let style4 = Some(Style::default().dim());
let style5 = Some(Style::default().white().bold().not_dim());