lanes and grids

This commit is contained in:
🪞👃🪞 2024-06-12 18:38:16 +03:00
parent 788dc1ccde
commit ac865824cc
12 changed files with 213 additions and 112 deletions

View file

@ -12,7 +12,20 @@ impl Plugin {
}
}
pub fn render (state: &Plugin, buf: &mut Buffer, area: Rect) {}
pub fn render (state: &Plugin, buf: &mut Buffer, Rect { x, y, width, height }: Rect)
-> Usually<(u16, u16)>
{
let style = Style::default().gray();
draw_box(buf, Rect { x, y: y, width: 40, height: 8 });
buf.set_string(x + 1, y + 1, &format!(" {}", state.name), style.white().bold());
buf.set_string(x + 13, y + 1, &format!("│ Plugin Name"), style.not_dim());
buf.set_string(x + 0, y + 2, &format!("├--------------------------------------┤"), style.dim());
buf.set_string(x + 1, y + 3, &format!(" Parameter 1 0.0"), style);
buf.set_string(x + 1, y + 4, &format!(" Parameter 2 0.0"), style);
buf.set_string(x + 1, y + 5, &format!(" Parameter 3 0.0"), style);
buf.set_string(x + 1, y + 6, &format!(" Parameter 4 0.0"), style);
Ok((40, 7))
}
pub fn handle (state: &mut Plugin, event: &EngineEvent) -> Result<(), Box<dyn Error>> {
Ok(())