diff --git a/crates/tek_sequencer/src/arranger.rs b/crates/tek_sequencer/src/arranger.rs index 8a58f892..7dbb33a8 100644 --- a/crates/tek_sequencer/src/arranger.rs +++ b/crates/tek_sequencer/src/arranger.rs @@ -248,7 +248,12 @@ impl Arrangement { todo!("arrangement: move forward") } pub fn rename_selected (&mut self) { - todo!("arrangement: rename selected") + match self.selected { + ArrangementFocus::Track(t) => { todo!("rename track"); }, + ArrangementFocus::Scene(s) => { todo!("rename scene"); }, + ArrangementFocus::Clip(t, s) => { todo!("rename clip"); }, + _ => {} + } } } /// Methods for tracks in arrangement diff --git a/crates/tek_sequencer/src/lib.rs b/crates/tek_sequencer/src/lib.rs index ad8db9c9..535cd114 100644 --- a/crates/tek_sequencer/src/lib.rs +++ b/crates/tek_sequencer/src/lib.rs @@ -19,6 +19,11 @@ pub const PPQ: usize = 96; pub const CORNERS: CornersTall = CornersTall(NOT_DIM_GREEN); +/// Octave number (from -1 to 9) +pub const NTH_OCTAVE: [&'static str;11] = [ + "-1", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" +]; + tui_style!(GRAY_DIM = Some(Color::Gray), None, None, Modifier::DIM, Modifier::empty()); tui_style!(GRAY_NOT_DIM_BOLD = diff --git a/crates/tek_sequencer/src/sequencer_tui.rs b/crates/tek_sequencer/src/sequencer_tui.rs index 2b7691a1..7fd4e121 100644 --- a/crates/tek_sequencer/src/sequencer_tui.rs +++ b/crates/tek_sequencer/src/sequencer_tui.rs @@ -41,8 +41,18 @@ impl Content for PhrasePool { let border = Lozenge(Style::default().bg(Color::Rgb(40, 50, 30)).fg(border_color)); let content = content.fill_xy().bg(Color::Rgb(28, 35, 25)).border(border); let title_color = if *focused {Color::Rgb(150, 160, 90)} else {Color::Rgb(120, 130, 100)}; - let title = TuiStyle::fg("Phrases", title_color).push_x(1); - lay!(content, title) + let title = format!("Phrases ({})", phrases.len()); + let title = TuiStyle::fg(title, title_color).push_x(1); + Layers::new(move|add|{ + add(&content)?; + add(&title)?; + //if self.focused { + //let commands = "[A]ppend [I]nsert [D]uplicate [C]olor re[N]ame leng[T]h [,.] Move"; + //let lower_left = Align::SW(TuiStyle::fg(commands, title_color).push_x(1)); + //add(&lower_left)?; + //} + Ok(()) + }) } } impl Content for PhraseEditor { @@ -290,11 +300,6 @@ pub(crate) fn keys_vert () -> Buffer { }); buffer } -/// Octave number (from -1 to 9) -const NTH_OCTAVE: [&'static str;11] = [ - "-1", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" -]; - impl Content for PhraseLength { type Engine = Tui; fn content (&self) -> impl Widget {