wip: fixing Map, centering

This commit is contained in:
🪞👃🪞 2025-01-01 17:00:28 +01:00
parent 059ff2ca79
commit d17d20e7db
10 changed files with 104 additions and 78 deletions

View file

@ -128,7 +128,7 @@ render!(Tui: (self: Groovebox) => {
PhraseSelector::play_phrase(&self.player),
PhraseSelector::next_phrase(&self.player),
)));
"tabula rasa"
PoolView(&self.pool)
//let pool = PoolView(&self.pool);
//let with_pool = move|x|Bsp::w(Fixed::x(pool_w, Pull::y(1, Fill::y(Align::e(pool)))), x);
//with_pool(col!(transport, selector))
@ -182,7 +182,8 @@ render!(Tui: (self: GrooveboxSamples<'a>) => {
let note_lo = self.0.editor.note_lo().load(Relaxed);
let note_pt = self.0.editor.note_point();
let note_hi = self.0.editor.note_hi();
Fill::xy(Tui::map((note_lo..=note_hi).rev(), move|note, i| {
let range = move||(note_lo..=note_hi).rev();
Fill::xy(Tui::map(range, move|note, i| {
let mut bg = if note == note_pt { TuiTheme::g(64) } else { Color::Reset };
let mut fg = TuiTheme::g(160);
if let Some((index, _)) = self.0.sampler.recording {