2023-05-30 00:46:21 +00:00
|
|
|
use arkham::prelude::*;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
App::new(root)
|
|
|
|
.insert_resource(Theme::default())
|
|
|
|
.run()
|
|
|
|
.expect("couldnt launch app");
|
|
|
|
}
|
|
|
|
|
|
|
|
fn root(ctx: &mut ViewContext, theme: Res<Theme>) {
|
|
|
|
let size = ctx.size();
|
2024-04-19 19:06:45 +00:00
|
|
|
ctx.fill_all(theme.bg_primary);
|
|
|
|
ctx.fill(Rect::new((5, 5), size - 10), theme.bg_secondary);
|
2023-05-30 00:46:21 +00:00
|
|
|
ctx.insert((10, 10), "Hello World");
|
|
|
|
ctx.insert(
|
|
|
|
((size.width / 2) - 7, 0),
|
|
|
|
"Press Q to Quit".to_runes().fg(theme.fg),
|
|
|
|
);
|
|
|
|
}
|