errors fixed, renders nothing :(

This commit is contained in:
🪞👃🪞 2024-09-07 18:43:24 +03:00
parent b3f0f60400
commit 4cca03352a
9 changed files with 47 additions and 44 deletions

View file

@ -198,20 +198,6 @@ pub enum TuiEvent {
// Jack(JackEvent)
}
/// Rendering unit struct to Ratatui returns zero-sized [Area] at render coordinates.
impl Render<Tui> for () {
fn render (&self, to: &mut Tui) -> Perhaps<[u16;4]> {
self.layout(to.area())
}
}
/// Layout of unit struct in Ratatui is zero-sized [Area] at render coordinates.
impl Layout<Tui> for () {
fn layout (&self, area: [u16;4]) -> Perhaps<[u16;4]> {
Ok(Some([area.x(), area.y(), 0, 0]))
}
}
impl Area<u16> for Rect {
fn x (&self) -> u16 { self.x }
fn y (&self) -> u16 { self.y }