~tm85/lintuini

ref: 3873712ae1cc616bff72c3dae4513bc21bf5f67f lintuini/examples/empty_container.rs -rw-r--r-- 749 bytes
3873712aTerraMaster85 feat: element.rs: wow it compiles again. api general idea now stable ish? 27 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
extern crate lintuini;
use lintuini::elements::Element;
use lintuini::elements::Container;

use ratatui::style::{Color, Style};
use ratatui::widgets::BorderType;

use crossterm::event;

fn main() -> std::io::Result<()> {
    let fill = Style::default().bg(Color::Blue);
    let bord_style = Style::default().bg(Color::Green).fg(Color::Black);
    let bord_type = BorderType::Double;
    let cont = lintuini::elements::Container::new();

    ratatui::run(|mut terminal| {
        loop {
            terminal.draw(|mut frame| {
                let area = frame.area();
                cont.render(&mut frame, area).unwrap()
            })?;
            if event::read()?.is_key_press() {
                break Ok(());
            }
        }
    })
}