mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
scene playing indicator
This commit is contained in:
parent
e605935698
commit
7d6bdcca99
2 changed files with 7 additions and 8 deletions
|
|
@ -1,11 +1,7 @@
|
||||||
use crate::core::*;
|
use crate::core::*;
|
||||||
|
|
||||||
#[derive(PartialEq)]
|
#[derive(PartialEq)]
|
||||||
pub enum TransportFocus {
|
pub enum TransportFocus { BPM, Quant, Sync }
|
||||||
BPM,
|
|
||||||
Quant,
|
|
||||||
Sync,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl TransportFocus {
|
impl TransportFocus {
|
||||||
pub fn prev (&mut self) {
|
pub fn prev (&mut self) {
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,12 @@ impl<'a> ArrangerView<'a> {
|
||||||
(0 == self.cursor.0) && (scene_index + 1 == self.cursor.1)
|
(0 == self.cursor.0) && (scene_index + 1 == self.cursor.1)
|
||||||
).bold());
|
).bold());
|
||||||
let y = 1 + y + 2 * scene_index as u16;
|
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)?;
|
scene.name.blit(buf, x + 2, y, style)?;
|
||||||
}
|
}
|
||||||
let width = 2 + self.scenes.iter()
|
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> {
|
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 style3 = Some(Style::default().yellow().bold().not_dim());
|
||||||
let style4 = Some(Style::default().dim());
|
let style4 = Some(Style::default().dim());
|
||||||
let style5 = Some(Style::default().white().bold().not_dim());
|
let style5 = Some(Style::default().white().bold().not_dim());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue