sliders (wip), fix wlx build

This commit is contained in:
Aleksander
2025-06-28 19:28:05 +02:00
parent 28d58fef59
commit 9d0c0f015c
15 changed files with 323 additions and 60 deletions

View File

@@ -42,8 +42,13 @@ impl<S> GuiPanel<S> {
path: &str,
state: S,
) -> anyhow::Result<(Self, ParserResult)> {
let (layout, parser_result) =
wgui::parser::new_layout_from_assets(Box::new(gui::asset::GuiAsset {}), path)?;
let mut listeners = EventListenerCollection::<AppState, S>::default();
let (layout, parser_result) = wgui::parser::new_layout_from_assets(
Box::new(gui::asset::GuiAsset {}),
&mut listeners,
path,
)?;
let context = WguiContext::new(&mut app.wgui_shared, 1.0)?;
let mut timestep = Timestep::new();
@@ -56,7 +61,7 @@ impl<S> GuiPanel<S> {
timestep,
state,
timers: vec![],
listeners: EventListenerCollection::default(),
listeners,
},
parser_result,
))