Add another way to load .60 files from a build script

This commit is contained in:
Olivier Goffart 2020-06-05 13:32:56 +02:00
parent 0553ab8b1a
commit 9fc60e104f
10 changed files with 219 additions and 2 deletions

View file

@ -0,0 +1,16 @@
sixtyfps::include_modules!();
fn main() {
let mut app = Hello::default();
app.plus_clicked.set_handler(|context, ()| {
let app = context.component.downcast::<Hello>().unwrap();
app.counter.set(app.counter.get(context) + 1);
});
app.minus_clicked.set_handler(|context, ()| {
let app = context.component.downcast::<Hello>().unwrap();
app.counter.set(app.counter.get(context) - 1);
});
app.run();
}