mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
show sample names
This commit is contained in:
parent
511ff91864
commit
5bc19a45d2
8 changed files with 23 additions and 25 deletions
|
|
@ -23,22 +23,23 @@ render!(Tui: (self: SampleList<'a>) => {
|
|||
|
||||
let mut bg = if note == note_pt { TuiTheme::g(64) } else { Color::Reset };
|
||||
let mut fg = TuiTheme::g(160);
|
||||
if sampler.mapped[note].is_some() {
|
||||
fg = TuiTheme::g(224);
|
||||
bg = Color::Rgb(0, if note == note_pt { 96 } else { 64 }, 0);
|
||||
}
|
||||
if let Some((index, _)) = sampler.recording {
|
||||
if note == index {
|
||||
bg = Color::Rgb(64,16,0);
|
||||
bg = if note == note_pt { Color::Rgb(96,24,0) } else { Color::Rgb(64,16,0) };
|
||||
fg = Color::Rgb(224,64,32)
|
||||
}
|
||||
} else if sampler.mapped[note].is_some() {
|
||||
fg = TuiTheme::g(224);
|
||||
}
|
||||
|
||||
offset(Tui::fg_bg(fg, bg, format!("{note:3} {}", if *compact {
|
||||
""
|
||||
String::default()
|
||||
} else if let Some(sample) = &sampler.mapped[note] {
|
||||
"??????"
|
||||
sample.read().unwrap().name.clone()
|
||||
} else {
|
||||
"(none)"
|
||||
String::from("(none)")
|
||||
})))
|
||||
|
||||
}))
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue