skunky example

This commit is contained in:
2026-03-21 19:15:28 -04:00
parent 2afbfe6b6f
commit 82ca487bbf
2 changed files with 59 additions and 126 deletions

View File

@@ -89,7 +89,7 @@ impl App {
pub fn mount<R: RootComponent>(self, root: R) -> MountedApp<R> {
MountedApp {
window: self.window,
root,
root: Rc::new(root),
}
}
}
@@ -100,9 +100,9 @@ impl Default for App {
}
}
pub struct MountedApp<R> {
pub struct MountedApp<R: RootComponent> {
window: Window,
root: R,
root: Rc<R>,
}
impl<R: RootComponent> MountedApp<R> {
@@ -122,7 +122,7 @@ impl<R: RootComponent> MountedApp<R> {
let scene_version = StdCell::new(0_u64);
let text_system = Rc::new(RefCell::new(TextSystem::new()));
let interaction_tree = Rc::new(RefCell::new(None::<InteractionTree>));
let root = Rc::new(root);
let root = Rc::clone(&root);
let mut pointer_router = PointerRouter::new();
let mut current_cursor = CursorIcon::Default;