closer and closer to testing it away

This commit is contained in:
stop screaming 2026-02-21 18:13:36 +02:00
parent 817d2a722c
commit 4aef21f60d
10 changed files with 1782 additions and 2028 deletions

View file

@ -1076,3 +1076,64 @@
//}
//};
//}
//take!(MidiInputCommand |state: Arrangement, iter|state.selected_midi_in().as_ref()
//.map(|t|Take::take(t, iter)).transpose().map(|x|x.flatten()));
//take!(MidiOutputCommand |state: Arrangement, iter|state.selected_midi_out().as_ref()
//.map(|t|Take::take(t, iter)).transpose().map(|x|x.flatten()));
//impl<T, U: Has<Option<T>>> MaybeHas<T> for U {
//fn get (&self) -> Option<&T> {
//Has::<Option<T>>::get(self).as_ref()
//}
//}
//
//// DRAW SAMPLE ADD:
//let area = to.area();
//to.make_dim();
//let area = center_box(
//area,
//64.max(area.w().saturating_sub(8)),
//20.max(area.w().saturating_sub(8)),
//);
//to.fill_fg(area, Color::Reset);
//to.fill_bg(area, Nord::bg_lo(true, true));
//to.fill_char(area, ' ');
//to.blit(&format!("{}", &self.dir.to_string_lossy()), area.x()+2, area.y()+1, Some(Style::default().bold()))?;
//to.blit(&"Select sample:", area.x()+2, area.y()+2, Some(Style::default().bold()))?;
//for (i, (is_dir, name)) in self.subdirs.iter()
//.map(|path|(true, path))
//.chain(self.files.iter().map(|path|(false, path)))
//.enumerate()
//.skip(self.offset)
//{
//if i >= area.h() as usize - 4 {
//break
//}
//let t = if is_dir { "" } else { "" };
//let line = format!("{t} {}", name.to_string_lossy());
//let line = &line[..line.len().min(area.w() as usize - 4)];
//to.blit(&line, area.x() + 2, area.y() + 3 + i as u16, Some(if i == self.cursor {
//Style::default().green()
//} else {
//Style::default().white()
//}))?;
//}
//Lozenge(Style::default()).draw(to)
//let cells_x = 8u16;
//let cells_y = 8u16;
//let cell_width = 10u16;
//let cell_height = 2u16;
//let width = cells_x * cell_width;
//let height = cells_y * cell_height;
//let cols = Map::east(
//cell_width,
//move||0..cells_x,
//move|x, _|Map::south(
//cell_height,
//move||0..cells_y,
//move|y, _|self.view_grid_cell("........", x, y, cell_width, cell_height)
//)
//);
//cols
//Thunk::new(|to: &mut TuiOut|{
//})