sliders (wip), fix wlx build
This commit is contained in:
@@ -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,
|
||||
))
|
||||
|
||||
@@ -77,6 +77,7 @@ where
|
||||
|
||||
let (_, mut gui_state_key) = wgui::parser::new_layout_from_assets(
|
||||
Box::new(gui::asset::GuiAsset {}),
|
||||
&mut panel.listeners,
|
||||
"gui/keyboard.xml",
|
||||
)?;
|
||||
|
||||
@@ -156,7 +157,13 @@ where
|
||||
}
|
||||
|
||||
let template_key = format!("Key{:?}", key.cap_type);
|
||||
gui_state_key.process_template(&template_key, &mut panel.layout, div, params)?;
|
||||
gui_state_key.process_template(
|
||||
&template_key,
|
||||
&mut panel.layout,
|
||||
&mut panel.listeners,
|
||||
div,
|
||||
params,
|
||||
)?;
|
||||
|
||||
if let Some(widget_id) = gui_state_key.ids.get(&*my_id) {
|
||||
let key_state = {
|
||||
|
||||
Reference in New Issue
Block a user