mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
auto create phrase
This commit is contained in:
parent
059b4c0aa8
commit
7aad6d1678
2 changed files with 7 additions and 3 deletions
|
|
@ -143,6 +143,10 @@ impl<E: Engine> Arranger<E> {
|
||||||
}
|
}
|
||||||
/// Focus the editor with the current phrase
|
/// Focus the editor with the current phrase
|
||||||
pub fn edit_phrase (&mut self) {
|
pub fn edit_phrase (&mut self) {
|
||||||
|
if self.arrangement.phrase().is_none() {
|
||||||
|
self.phrases.write().unwrap().append_new(None, None);
|
||||||
|
self.arrangement.phrase_put();
|
||||||
|
}
|
||||||
self.show_phrase();
|
self.show_phrase();
|
||||||
self.focus(ArrangerFocus::PhraseEditor);
|
self.focus(ArrangerFocus::PhraseEditor);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -138,10 +138,10 @@ impl Content for PhraseEditor<Tui> {
|
||||||
}
|
}
|
||||||
if *focused {
|
if *focused {
|
||||||
if *entered {
|
if *entered {
|
||||||
lower_left = "[Esc] Exit edit mode [A]ppend [S]et".to_string();
|
//lower_left = "[Esc] Exit edit mode [A]ppend [S]et".to_string();
|
||||||
lower_right = format!("[,.] Note: {} {lower_right}", ppq_to_name(*note_len));
|
lower_right = format!("[,.] Note: {} [<>] {lower_right}", ppq_to_name(*note_len));
|
||||||
} else {
|
} else {
|
||||||
lower_left = "[Enter] Edit notes".to_string();
|
//lower_left = "[Enter] Edit notes".to_string();
|
||||||
lower_right = format!("[,.] {lower_right}");
|
lower_right = format!("[,.] {lower_right}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue