wgui: components refactoring, id handles

This commit is contained in:
Aleksander
2025-08-09 13:23:49 +02:00
parent 17b4eaa1e4
commit 91e584383f
13 changed files with 243 additions and 79 deletions

View File

@@ -1,7 +1,9 @@
use crate::{
components::slider,
layout::WidgetID,
parser::{ParserContext, ParserFile, iter_attribs, parse_check_f32, style::parse_style},
parser::{
ParserContext, ParserFile, iter_attribs, parse_check_f32, process_component, style::parse_style,
},
};
pub fn parse_component_slider<'a, U1, U2>(
@@ -32,7 +34,7 @@ pub fn parse_component_slider<'a, U1, U2>(
}
}
ctx.components.push(slider::construct(
let component = slider::construct(
ctx.layout,
ctx.listeners,
parent_id,
@@ -44,7 +46,9 @@ pub fn parse_component_slider<'a, U1, U2>(
value: initial_value,
},
},
)?);
)?;
process_component(file, ctx, node, component)?;
Ok(())
}