wgui: event results/blocking for overlapping content, rev iterate events for root node

This commit is contained in:
Aleksander
2025-10-05 20:11:49 +02:00
parent 89c083991f
commit efcc41de19
8 changed files with 131 additions and 76 deletions

View File

@@ -210,7 +210,7 @@ impl TestbedGeneric {
},
)?;
let _state = wgui::parser::parse_from_assets(
let state = wgui::parser::parse_from_assets(
&ParseDocumentParams {
globals,
path: XML_PATH,
@@ -221,6 +221,18 @@ impl TestbedGeneric {
widget.id,
)?;
let button = state
.fetch_component_as::<ComponentButton>("button")
.unwrap();
button.on_click(Box::new(move |_common, _e| {
log::info!("click");
Ok(())
}));
// temporary, preserve listeners state
Box::leak(Box::new(state));
Ok(())
}
}