wip: p.49, e=12, tired

This commit is contained in:
🪞👃🪞 2024-11-17 07:07:58 +01:00
parent 550fd4cbcd
commit d24738f9f4
2 changed files with 5 additions and 5 deletions

View file

@ -13,7 +13,7 @@ impl Widget for PhrasesTui {
pub trait PhrasesViewState {
fn focused (&self) -> bool;
fn entered (&self) -> bool;
fn phrases (&self) -> Vec<()>;
fn phrases (&self) -> Vec<Arc<RwLock<Phrase>>>;
fn phrase (&self) -> usize;
fn mode (&self) -> Option<&PhrasesMode>;
}
@ -25,7 +25,7 @@ impl PhrasesViewState for PhrasesTui {
fn entered (&self) -> bool {
todo!()
}
fn phrases (&self) -> Vec<()> {
fn phrases (&self) -> Vec<Arc<RwLock<Phrase>>> {
todo!()
}
fn phrase (&self) -> usize {
@ -53,7 +53,7 @@ impl<'a, T: PhrasesViewState> Content for PhrasesView<'a, T> {
let mut length = PhraseLength::new(length, None);
if let Some(PhrasesMode::Length(phrase, new_length, focus)) = mode {
if focused && i == *phrase {
length.pulses = new_length;
length.pulses = *new_length;
length.focus = Some(focus);
}
}

View file

@ -4,7 +4,7 @@ impl Content for SequencerTui {
type Engine = Tui;
fn content (&self) -> impl Widget<Engine = Tui> {
col!(
widget(&TransportRefView(self)),
widget(&TransportView(self)),
Split::right(20,
widget(&PhrasesView(self)),
widget(&PhraseView(self)),
@ -44,7 +44,7 @@ impl PhrasesViewState for SequencerTui {
fn entered (&self) -> bool {
todo!()
}
fn phrases (&self) -> Vec<()> {
fn phrases (&self) -> Vec<Arc<RwLock<Phrase>>> {
todo!()
}
fn phrase (&self) -> usize {