mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-25 08:28:42 -06:00
wip
This commit is contained in:
parent
40ef524c5a
commit
e297c77453
29
hui-examples/examples/vscode_layout.rs
Normal file
29
hui-examples/examples/vscode_layout.rs
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
);
|
Loading…
Reference in a new issue