piecing back together the groovebox

This commit is contained in:
🪞👃🪞 2025-01-01 21:37:46 +01:00
parent 77091671a3
commit 50bb8cab07
3 changed files with 8 additions and 14 deletions

View file

@ -112,12 +112,11 @@ impl<E, T, I, J, R, F> Content<E> for Map<E, T, I, J, R, F> where
}
fn render (&self, to: &mut E::Output) {
let mut index = 0;
let area = self.layout(to.area());
//panic!("{area:?}");
//to.blit(&format!("{area:?}"), 0, 0, None);
//let area = self.layout(to.area());
for item in (self.1)() {
let item = (self.2)(item, index);
to.place(area.into(), &item);
//to.place(area.into(), &item);
to.place(to.area().into(), &item);
index += 1;
}
}

View file

@ -128,10 +128,9 @@ render!(Tui: (self: Groovebox) => {
PhraseSelector::play_phrase(&self.player),
PhraseSelector::next_phrase(&self.player),
)));
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))
let pool = PoolView(&self.pool);
let with_pool = move|x|Bsp::w(Pull::y(1, Align::e(Fill::y(Fixed::x(pool_w, pool)))), x);
with_pool(Fill::xy(Align::nw(col!(transport, selector))))
//selector
//let sampler = move|x|Bsp::e(
//Fixed::x(sampler_w, Fill::xy(col!(

View file

@ -219,12 +219,8 @@ render!(Tui: (self: PoolView<'a>) => {
offset(Tui::bg(if selected { color.light.rgb } else { color.base.rgb }, lay!(
Align::w(Tui::fg(color.lightest.rgb, format!(" {i:>3} {name}"))),
Align::e(Tui::fg(color.lightest.rgb, format!("{length} "))),
Align::w(Tui::when(selected, Tui::bold(true, Tui::fg(color.lightest.rgb, "[")))),
Align::e(Tui::when(selected, Tui::bold(true, Tui::fg(color.lightest.rgb, "]")))),
//Tui::when(, Fixed::y(1, Tui::fg(Color::Green, lay!(
//Align::w(format!("[")),
//Align::e(format!("]")),
//))))
Align::w(Tui::when(selected, Tui::bold(true, Tui::fg(TuiTheme::g(255), "")))),
Align::e(Tui::when(selected, Tui::bold(true, Tui::fg(TuiTheme::g(255), "")))),
)))/*
//format!(" {i} {name} {length} ")[>
//Push::y(i as u16 * 2, Fixed::y(2, Tui::bg(color.base.rgb, Fill::x(