mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-10 05:36:42 +01:00
transport master
This commit is contained in:
parent
185c6b5b34
commit
be2c2df92b
4 changed files with 85 additions and 62 deletions
|
|
@ -44,21 +44,21 @@ pub fn render (state: &Plugin, buf: &mut Buffer, Rect { x, y, .. }: Rect)
|
|||
let style = Style::default().gray();
|
||||
buf.set_string(x + 1, y + 1, &format!(" {}", state.name), style.white().bold());
|
||||
buf.set_string(x + 13, y + 1, &format!("│ ...{}...", &HELM[13..30]), style.not_dim());
|
||||
buf.set_string(x + 0, y + 2, &format!("├--------------------------------------┤"), style.dim());
|
||||
buf.set_string(x + 0, y + 2, &format!("├------------------------------------------------┤"), style.dim());
|
||||
match &state.plugin {
|
||||
Some(PluginKind::LV2(ports, instance)) => {
|
||||
let mut height = 3;
|
||||
for (i, port) in ports.iter().skip(state.parameter_offset).enumerate() {
|
||||
if i >= 10 {
|
||||
if i >= 20 {
|
||||
break
|
||||
}
|
||||
buf.set_string(x + 2, y + 3 + i as u16, &format!("{:20} = {:03}",
|
||||
buf.set_string(x + 2, y + 3 + i as u16, &format!("{:30} = {:03}",
|
||||
port.name,
|
||||
port.default_value
|
||||
), Style::default());
|
||||
height = height + 1;
|
||||
}
|
||||
Ok(draw_box(buf, Rect { x, y, width: 40, height: height.max(10) }))
|
||||
Ok(draw_box(buf, Rect { x, y, width: 50, height: height.max(20) }))
|
||||
},
|
||||
_ => {
|
||||
buf.set_string(x + 1, y + 3, &format!(" Parameter 1 0.0"), style);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue