mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
display clamps; pass amount to axis inc/dec
This commit is contained in:
parent
694aed6d9b
commit
27b1c27891
3 changed files with 24 additions and 26 deletions
|
|
@ -88,7 +88,7 @@ impl Content for PhraseEditor<Tui> {
|
|||
if *entered {
|
||||
let area = to.area();
|
||||
if let (Some(time), Some(note)) = (time_axis.point, note_axis.point) {
|
||||
let x = area.x() + time as u16;
|
||||
let x = area.x() + (time / time_axis.scale) as u16;
|
||||
let y = area.y() + 1 + note as u16 / 2;
|
||||
let c = if note % 2 == 0 { "▀" } else { "▄" };
|
||||
to.blit(&c, x, y, Some(Style::default().fg(color)));
|
||||
|
|
@ -130,17 +130,19 @@ impl Content for PhraseEditor<Tui> {
|
|||
if let Some(phrase) = phrase {
|
||||
upper_left = format!("{upper_left}: {}", phrase.read().unwrap().name);
|
||||
}
|
||||
let mut upper_right = format!("Zoom: {} (+{}:{}*{})",
|
||||
let mut upper_right = format!("Zoom: {} (+{}:{}*{}|{})",
|
||||
ppq_to_name(time_axis.scale),
|
||||
time_axis.start,
|
||||
time_axis.point.unwrap_or(0),
|
||||
time_axis.scale,
|
||||
time_axis.clamp.unwrap_or(0),
|
||||
);
|
||||
if *focused && *entered {
|
||||
upper_right = format!("Note: {} (+{}:{}) {upper_right}",
|
||||
upper_right = format!("Note: {} (+{}:{}|{}) {upper_right}",
|
||||
ppq_to_name(*note_len),
|
||||
note_axis.start,
|
||||
note_axis.point.unwrap_or(0)
|
||||
note_axis.point.unwrap_or(0),
|
||||
note_axis.clamp.unwrap_or(0),
|
||||
);
|
||||
}
|
||||
lay!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue