From e297c7745351ff2532a1d7ee8a7da5285e675e6f Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Thu, 7 Mar 2024 02:12:14 +0100 Subject: [PATCH] wip --- hui-examples/examples/vscode_layout.rs | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 hui-examples/examples/vscode_layout.rs diff --git a/hui-examples/examples/vscode_layout.rs b/hui-examples/examples/vscode_layout.rs new file mode 100644 index 0000000..9f6954e --- /dev/null +++ b/hui-examples/examples/vscode_layout.rs @@ -0,0 +1,29 @@ +//TODO: finish this demo + +use std::time::Instant; +use hui::{ + color, size, + layout::{Alignment, Direction}, + element::{ + container::Container, + fill_rect::FillRect, + UiElementExt + }, +}; + +#[path = "../boilerplate.rs"] +#[macro_use] +mod boilerplate; + +ui_main!( + "hUI: vscode demo", + init: |_| { + Instant::now() + }, + run: |ui, size, instant| { + Container::default() + .with_size(size!(100%)) + .with_background(color::WHITE) + .add_root(ui, size); + } +);