wip: p.53, e=118, fixed focus trait loop

This commit is contained in:
🪞👃🪞 2024-11-17 19:19:46 +01:00
parent 9b996878c2
commit 76af9d9bac
15 changed files with 737 additions and 727 deletions

View file

@ -808,10 +808,10 @@ pub trait PhraseViewState: Send + Sync {
impl PhraseViewState for PhraseTui {
fn focused (&self) -> bool {
&self.focused
self.focused
}
fn entered (&self) -> bool {
&self.entered
self.entered
}
fn keys (&self) -> &Buffer {
&self.keys
@ -823,7 +823,7 @@ impl PhraseViewState for PhraseTui {
&self.buffer
}
fn note_len (&self) -> usize {
&self.note_len
self.note_len
}
fn note_axis (&self) -> &RwLock<FixedAxis<usize>> {
&self.note_axis
@ -1066,7 +1066,7 @@ pub struct PhraseLength {
impl PhraseLength {
pub fn new (pulses: usize, focus: Option<PhraseLengthFocus>) -> Self {
Self { _engine: Default::default(), ppq: PPQ, bpb: 4, pulses, focus }
Self { ppq: PPQ, bpb: 4, pulses, focus }
}
pub fn bars (&self) -> usize {
self.pulses / (self.bpb * self.ppq)