wip: tryptich layout

This commit is contained in:
🪞👃🪞 2025-03-09 07:00:19 +02:00
parent 438a2d86a6
commit 30f2cba54d
4 changed files with 246 additions and 282 deletions

View file

@ -547,10 +547,10 @@ impl AddSampleModal {
return Ok(false)
}
}
pub fn read_sample_data (_: &str) -> Usually<(usize, Vec<Vec<f32>>)> {
fn read_sample_data (_: &str) -> Usually<(usize, Vec<Vec<f32>>)> {
todo!();
}
pub fn scan (dir: &PathBuf) -> Usually<(Vec<OsString>, Vec<OsString>)> {
fn scan (dir: &PathBuf) -> Usually<(Vec<OsString>, Vec<OsString>)> {
let (mut subdirs, mut files) = std::fs::read_dir(dir)?
.fold((vec!["..".into()], vec![]), |(mut subdirs, mut files), entry|{
let entry = entry.expect("failed to read drectory entry");
@ -566,7 +566,7 @@ pub fn scan (dir: &PathBuf) -> Usually<(Vec<OsString>, Vec<OsString>)> {
files.sort();
Ok((subdirs, files))
}
pub fn draw_sample (
fn draw_sample (
to: &mut TuiOut, x: u16, y: u16, note: Option<&u7>, sample: &Sample, focus: bool
) -> Usually<usize> {
let style = if focus { Style::default().green() } else { Style::default() };