nicer demo

This commit is contained in:
🪞👃🪞 2024-09-13 02:38:39 +03:00
parent a0fbbc6257
commit 9816d2ee9d

View file

@ -36,27 +36,27 @@ impl Demo<Tui> {
impl Content for Demo<Tui> {
type Engine = Tui;
fn content (&self) -> impl Widget<Engine = Tui> {
Layers::new(|add|{
Align::Center(Layers::new(|add|{
add(&FillBg(Color::Rgb(0,128,128)))?;
add(&Outset::XY(1, 1, Split::down(|add|{
add(&Layers::new(|add|{
add(&FillBg(Color::Rgb(255,0,0)))?;
add(&Outset::X(1, "."))?;
add(&FillBg(Color::Rgb(255,255,0)))?;
add(&Outset::XY(2, 1, "..."))?;
Ok(())
}))?;
add(&Layers::new(|add|{
add(&FillBg(Color::Rgb(255,128,0)))?;
add(&Outset::Y(1, "---"))?;
add(&Outset::XY(4, 2, "---"))?;
Ok(())
}))?;
add(&Layers::new(|add|{
add(&FillBg(Color::Rgb(128,0,0)))?;
add(&Outset::XY(0, 0, "~~~"))?;
add(&FillBg(Color::Rgb(128,128,0)))?;
add(&Outset::XY(6, 3, "~~~"))?;
Ok(())
}))?;
@ -65,7 +65,7 @@ impl Content for Demo<Tui> {
Ok(())
})
}))
//Align::Center(Outset::X(1, Layers::new(|add|{
//add(&FillBg(Color::Rgb(128,0,0)))?;
//add(&Split::down(|add|{