mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
wip: rename in arrangement; phrase pool help
This commit is contained in:
parent
0f3c777c88
commit
7ebc8af2f3
3 changed files with 23 additions and 8 deletions
|
|
@ -248,7 +248,12 @@ impl<E: Engine> Arrangement<E> {
|
||||||
todo!("arrangement: move forward")
|
todo!("arrangement: move forward")
|
||||||
}
|
}
|
||||||
pub fn rename_selected (&mut self) {
|
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
|
/// Methods for tracks in arrangement
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,11 @@ pub const PPQ: usize = 96;
|
||||||
|
|
||||||
pub const CORNERS: CornersTall = CornersTall(NOT_DIM_GREEN);
|
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 =
|
tui_style!(GRAY_DIM =
|
||||||
Some(Color::Gray), None, None, Modifier::DIM, Modifier::empty());
|
Some(Color::Gray), None, None, Modifier::DIM, Modifier::empty());
|
||||||
tui_style!(GRAY_NOT_DIM_BOLD =
|
tui_style!(GRAY_NOT_DIM_BOLD =
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,18 @@ impl Content for PhrasePool<Tui> {
|
||||||
let border = Lozenge(Style::default().bg(Color::Rgb(40, 50, 30)).fg(border_color));
|
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 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_color = if *focused {Color::Rgb(150, 160, 90)} else {Color::Rgb(120, 130, 100)};
|
||||||
let title = TuiStyle::fg("Phrases", title_color).push_x(1);
|
let title = format!("Phrases ({})", phrases.len());
|
||||||
lay!(content, title)
|
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<Tui> {
|
impl Content for PhraseEditor<Tui> {
|
||||||
|
|
@ -290,11 +300,6 @@ pub(crate) fn keys_vert () -> Buffer {
|
||||||
});
|
});
|
||||||
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<Tui> {
|
impl Content for PhraseLength<Tui> {
|
||||||
type Engine = Tui;
|
type Engine = Tui;
|
||||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue