wgui: interactable components, rename TextLabel -> WidgetLabel
This commit is contained in:
@@ -5,7 +5,7 @@ use crate::{
|
||||
ParserContext, ParserFile, iter_attribs, parse_children, parse_widget_universal,
|
||||
style::{parse_style, parse_text_style},
|
||||
},
|
||||
widget::text::{TextLabel, TextParams},
|
||||
widget::label::{WidgetLabelParams, WidgetLabel},
|
||||
};
|
||||
|
||||
pub fn parse_widget_label<'a, U1, U2>(
|
||||
@@ -14,7 +14,7 @@ pub fn parse_widget_label<'a, U1, U2>(
|
||||
node: roxmltree::Node<'a, 'a>,
|
||||
parent_id: WidgetID,
|
||||
) -> anyhow::Result<()> {
|
||||
let mut params = TextParams::default();
|
||||
let mut params = WidgetLabelParams::default();
|
||||
let attribs: Vec<_> = iter_attribs(file, ctx, &node, false).collect();
|
||||
|
||||
let style = parse_style(&attribs);
|
||||
@@ -36,7 +36,7 @@ pub fn parse_widget_label<'a, U1, U2>(
|
||||
let (new_id, _) =
|
||||
ctx
|
||||
.layout
|
||||
.add_child(parent_id, TextLabel::create(&mut i18n, params)?, style)?;
|
||||
.add_child(parent_id, WidgetLabel::create(&mut i18n, params)?, style)?;
|
||||
|
||||
parse_widget_universal(file, ctx, node, new_id)?;
|
||||
parse_children(file, ctx, node, new_id)?;
|
||||
|
||||
Reference in New Issue
Block a user