mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
65 lines
1.9 KiB
Rust
65 lines
1.9 KiB
Rust
use crate::prelude::*;
|
|
|
|
pub struct Launcher {
|
|
name: String
|
|
}
|
|
|
|
impl Launcher {
|
|
pub fn new (name: &str) -> Result<DynamicDevice<Self>, Box<dyn Error>> {
|
|
Ok(DynamicDevice::new(render, handle, Self {
|
|
name: name.into(),
|
|
}))
|
|
}
|
|
}
|
|
|
|
pub fn process (
|
|
client: &Client,
|
|
scope: &ProcessScope
|
|
) -> Control {
|
|
Control::Continue
|
|
}
|
|
|
|
pub fn render (state: &Launcher, buf: &mut Buffer, area: Rect) -> Usually<Rect> {
|
|
Ok(Rect::default())
|
|
}
|
|
|
|
pub fn handle (state: &mut Launcher, event: &Event) -> Result<(), Box<dyn Error>> {
|
|
Ok(())
|
|
}
|
|
//let mut x = areas[1].x;
|
|
//for (index, track) in [
|
|
//"Track 1",
|
|
//"Track 2",
|
|
//"Track 3",
|
|
//"Track 4",
|
|
//"Track 5",
|
|
//"Bus 1",
|
|
//"Bus 2",
|
|
//"Mix",
|
|
//].iter().enumerate() {
|
|
//buffer.set_string(
|
|
//x + 10 * (index + 1) as u16, areas[1].y,
|
|
//"┬", Style::default().not_bold().dim()
|
|
//);
|
|
//buffer.set_string(
|
|
//x + 10 * (index + 1) as u16, areas[1].y + areas[1].height - 1,
|
|
//"┴", Style::default().not_bold().dim()
|
|
//);
|
|
//for y in areas[1].y+1..areas[1].y+areas[1].height - 1 {
|
|
//buffer.set_string(
|
|
//x + 10 * (index + 1) as u16, y,
|
|
//"│", Style::default().not_bold().gray().dim()
|
|
//);
|
|
//}
|
|
//for y in areas[1].y+2..areas[1].y+areas[1].height - 1 {
|
|
//buffer.set_string(
|
|
//x + 10 * index as u16 + 1, y,
|
|
//"--------", Style::default().not_bold().gray().dim()
|
|
//);
|
|
//}
|
|
//buffer.set_string(
|
|
//x + 10 * index as u16 + 1, areas[1].y + 1,
|
|
//track, Style::default().bold().not_dim()
|
|
//);
|
|
//}
|
|
|