Misc
This commit is contained in:
parent
1372c44b2a
commit
0e76c0284a
|
@ -30,27 +30,25 @@ pub fn tick_dioxus_ui(world: &mut World) {
|
||||||
for (root_entity, mut dioxus_ui_root) in
|
for (root_entity, mut dioxus_ui_root) in
|
||||||
world.query::<(Entity, &mut DioxusUiRoot)>().iter_mut(world)
|
world.query::<(Entity, &mut DioxusUiRoot)>().iter_mut(world)
|
||||||
{
|
{
|
||||||
dioxus_ui_root
|
let DioxusUiRoot {
|
||||||
.virtual_dom
|
virtual_dom,
|
||||||
.get()
|
initial_build,
|
||||||
|
} = &mut *dioxus_ui_root;
|
||||||
|
let virtual_dom = virtual_dom.get();
|
||||||
|
|
||||||
|
virtual_dom
|
||||||
.base_scope()
|
.base_scope()
|
||||||
.provide_context(ecs_context.clone());
|
.provide_context(ecs_context.clone());
|
||||||
|
|
||||||
if !dioxus_ui_root.initial_build {
|
if !*initial_build {
|
||||||
apply_mutations(dioxus_ui_root.virtual_dom.get().rebuild(), root_entity);
|
apply_mutations(virtual_dom.rebuild(), root_entity);
|
||||||
dioxus_ui_root.initial_build = true;
|
*initial_build = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Handle events from winit
|
// TODO: Handle events from winit
|
||||||
// dioxus_ui_root
|
// virtual_dom.handle_event(todo!(), todo!(), todo!(), todo!());
|
||||||
// .virtual_dom
|
|
||||||
// .get()
|
|
||||||
// .handle_event(todo!(), todo!(), todo!(), todo!());
|
|
||||||
|
|
||||||
apply_mutations(
|
apply_mutations(virtual_dom.render_immediate(), root_entity);
|
||||||
dioxus_ui_root.virtual_dom.get().render_immediate(),
|
|
||||||
root_entity,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
command_queue.apply(world);
|
command_queue.apply(world);
|
||||||
|
|
Loading…
Reference in a new issue