mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-25 16:38:42 -06:00
wip
This commit is contained in:
parent
226fac9e8b
commit
788ee5e98f
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