refactor sampler module

This commit is contained in:
🪞👃🪞 2024-12-28 18:12:43 +01:00
parent 97920d7063
commit df00fedfd6
6 changed files with 293 additions and 306 deletions

View file

@ -110,9 +110,11 @@ render!(<Tui>|self: GrooveboxSamples<'a>|{
bg = Color::Rgb(64,16,0);
fg = Color::Rgb(224,64,32)
}
} else if self.0.sampler.mapped[note].is_some() {
fg = TuiTheme::g(224);
}
Tui::bg(bg, if let Some(sample) = &self.0.sampler.mapped[note] {
Tui::fg(fg, format!("{note:3} ????? "))
Tui::fg(fg, format!("{note:3} ?????? "))
} else {
Tui::fg(fg, format!("{note:3} (none) "))
})