tui: pass coordinates to Widget::new()

This commit is contained in:
lunar-mining
2022-01-06 11:54:23 +01:00
parent 7029ad57db
commit 8a672bf19f

View File

@@ -14,8 +14,8 @@ pub struct Widget {
}
impl Widget {
pub fn new(title: String) -> Result<Widget> {
Ok(Widget { width: 0, height: 0, x: 0, y: 0, title })
pub fn new(width: usize, height: usize, x: usize, y: usize, title: String) -> Result<Widget> {
Ok(Widget { width, height, x, y, title })
}
pub fn print(