mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
add PhraseEditor::note_len
This commit is contained in:
parent
826cc5902b
commit
de1eb6ef97
3 changed files with 30 additions and 29 deletions
|
|
@ -48,7 +48,9 @@ impl Content for PhrasePool<Tui> {
|
|||
impl Content for PhraseEditor<Tui> {
|
||||
type Engine = Tui;
|
||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
let Self { focused, entered, time_axis, note_axis, keys, phrase, buffer, .. } = self;
|
||||
let Self {
|
||||
focused, entered, time_axis, note_axis, keys, phrase, buffer, note_len, ..
|
||||
} = self;
|
||||
let offset = Self::H_KEYS_OFFSET as u16;
|
||||
let keys = CustomWidget::new(|_|Ok(Some([32u16,4u16])), move|to: &mut TuiOutput|{
|
||||
if to.area().h() >= 2 {
|
||||
|
|
@ -120,8 +122,8 @@ impl Content for PhraseEditor<Tui> {
|
|||
}
|
||||
if *focused {
|
||||
if *entered {
|
||||
lower_left = "[Esc] Exit edit mode [A]ppend [I]nsert".to_string();
|
||||
lower_right = format!("[,.] Length: ?? {lower_right}");
|
||||
lower_left = "[Esc] Exit edit mode [A]ppend [S]et".to_string();
|
||||
lower_right = format!("[,.] Length: {} {lower_right}", ppq_to_name(*note_len));
|
||||
} else {
|
||||
lower_left = "[Enter] Edit notes".to_string();
|
||||
lower_right = format!("[,.] {lower_right}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue