This commit is contained in:
2026-01-24 14:47:53 +01:00
parent 1f9bf48bb4
commit 0f12a371e5
2 changed files with 24 additions and 5 deletions
+8
View File
@@ -35,5 +35,13 @@ fn app(cx: &Arc<Context>) -> View {
Arc::new(move |ctx| {
ctx.draw_text(Point { x: 0, y: 0 }, &format!("Count: {count}"));
let area = ctx.allocate(0, 0, 10, 10);
ctx.draw_view(area, Arc::new(my_view));
})
}
fn my_view(ctx: &mut DrawContext) {
let count = 67;
ctx.draw_text(Point { x: 0, y: 0 }, &format!("Count: {count}"));
}