ratatui
This commit is contained in:
@@ -1,3 +1,17 @@
|
||||
fn main() -> Result<(), ()> {
|
||||
Ok(())
|
||||
use std::time::Duration;
|
||||
|
||||
use ratatui::layout::{self, Constraint, Layout};
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
ratatui::run(|terminal| {
|
||||
loop {
|
||||
terminal.draw(|frame| {
|
||||
let layout = frame.area().layout_vec(&Layout::horizontal([
|
||||
Constraint::Percentage(50),
|
||||
Constraint::Percentage(50),
|
||||
]));
|
||||
frame.render_widget("Hello World!", layout[1])
|
||||
})?;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user