mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-07 04:06:48 +01:00
output: more big refactors
This commit is contained in:
parent
194f2f9874
commit
5e6338fad8
68 changed files with 1604 additions and 1016 deletions
|
|
@ -3,7 +3,7 @@
|
|||
(bg/behind :bg2 (border/around :border2 (margin/xy 4 2 :label2)))
|
||||
(bg/behind :bg3 (border/around :border3 (margin/xy 6 3 :label3)))))))
|
||||
|
||||
fn content (&self) -> dyn Render<Engine = Tui> {
|
||||
fn content (&self) -> dyn Draw<Engine = Tui> {
|
||||
let border_style = Style::default().fg(Color::Rgb(0,0,0));
|
||||
Align::Center(Layers::new(move|add|{
|
||||
|
||||
|
|
|
|||
|
|
@ -76,25 +76,25 @@ content!(TuiOut: |self: Example|{
|
|||
|
||||
//#[tengri_proc::view(TuiOut)]
|
||||
//impl Example {
|
||||
//pub fn title (&self) -> impl Render<TuiOut> + use<'_> {
|
||||
//pub fn title (&self) -> impl Draw<TuiOut> + use<'_> {
|
||||
//Tui::bg(Color::Rgb(60, 10, 10), Push::y(1, Align::n(format!("Example {}/{}:", self.0 + 1, EXAMPLES.len())))).boxed()
|
||||
//}
|
||||
//pub fn code (&self) -> impl Render<TuiOut> + use<'_> {
|
||||
//pub fn code (&self) -> impl Draw<TuiOut> + use<'_> {
|
||||
//Tui::bg(Color::Rgb(10, 60, 10), Push::y(2, Align::n(format!("{}", EXAMPLES[self.0])))).boxed()
|
||||
//}
|
||||
//pub fn hello (&self) -> impl Render<TuiOut> + use<'_> {
|
||||
//pub fn hello (&self) -> impl Draw<TuiOut> + use<'_> {
|
||||
//Tui::bg(Color::Rgb(10, 100, 10), "Hello").boxed()
|
||||
//}
|
||||
//pub fn world (&self) -> impl Render<TuiOut> + use<'_> {
|
||||
//pub fn world (&self) -> impl Draw<TuiOut> + use<'_> {
|
||||
//Tui::bg(Color::Rgb(100, 10, 10), "world").boxed()
|
||||
//}
|
||||
//pub fn hello_world (&self) -> impl Render<TuiOut> + use<'_> {
|
||||
//pub fn hello_world (&self) -> impl Draw<TuiOut> + use<'_> {
|
||||
//"Hello world!".boxed()
|
||||
//}
|
||||
//pub fn map_e (&self) -> impl Render<TuiOut> + use<'_> {
|
||||
//pub fn map_e (&self) -> impl Draw<TuiOut> + use<'_> {
|
||||
//Map::east(5u16, ||0..5u16, |n, _i|format!("{n}")).boxed()
|
||||
//}
|
||||
//pub fn map_s (&self) -> impl Render<TuiOut> + use<'_> {
|
||||
//pub fn map_s (&self) -> impl Draw<TuiOut> + use<'_> {
|
||||
//Map::south(5u16, ||0..5u16, |n, _i|format!("{n}")).boxed()
|
||||
//}
|
||||
//}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue