mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
wip: layout
This commit is contained in:
parent
ac865824cc
commit
d627d257ad
13 changed files with 220 additions and 131 deletions
|
|
@ -42,10 +42,10 @@ impl Mixer {
|
|||
}
|
||||
|
||||
pub fn render (state: &Mixer, buf: &mut Buffer, mut area: Rect)
|
||||
-> Usually<(u16, u16)>
|
||||
-> Usually<Rect>
|
||||
{
|
||||
if area.height < 2 {
|
||||
return Ok((0, 0))
|
||||
return Ok(area)
|
||||
}
|
||||
area.x = area.width.saturating_sub(80) / 2;
|
||||
area.width = area.width.min(80);
|
||||
|
|
@ -87,7 +87,7 @@ pub fn render (state: &Mixer, buf: &mut Buffer, mut area: Rect)
|
|||
//fn render_meters (
|
||||
//state: &mut Mixer,
|
||||
//stdout: &mut Stdout,
|
||||
//offset: (u16, u16)
|
||||
//offset: Rect
|
||||
//) -> Result<(), Box<dyn Error>> {
|
||||
//let move_to = |col, row| crossterm::cursor::MoveTo(offset.0 + col, offset.1 + row);
|
||||
//for (i, track) in state.tracks.iter().enumerate() {
|
||||
|
|
@ -102,7 +102,7 @@ pub fn render (state: &Mixer, buf: &mut Buffer, mut area: Rect)
|
|||
//}
|
||||
}
|
||||
}
|
||||
Ok((20,10))
|
||||
Ok(area)
|
||||
}
|
||||
|
||||
pub fn handle (state: &mut Mixer, event: &EngineEvent) -> Result<(), Box<dyn Error>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue