diff --git a/hui-examples/examples/modern_testbed.rs b/hui-examples/examples/modern_testbed.rs index bb27fef..7dfe5cd 100644 --- a/hui-examples/examples/modern_testbed.rs +++ b/hui-examples/examples/modern_testbed.rs @@ -42,11 +42,13 @@ fn main() { hui.add({ Container::default() + .with_size((UiSize::Fraction(1.), UiSize::Fraction(1.))) .with_padding(Sides::all(5.)) .with_children(|ui: &mut ElementList| { Text::default() .with_text("Hello, world") - .with_text_size(12) + .with_text_size(120) + .with_color(vec4(0., 0., 0., 1.)) .add_to(ui); }) }, resolution); diff --git a/hui/src/element.rs b/hui/src/element.rs index b3f065c..310b4de 100644 --- a/hui/src/element.rs +++ b/hui/src/element.rs @@ -84,11 +84,11 @@ impl From>> for ElementList { } pub trait UiElementListExt { - fn add_to(self, list: &mut ElementList); + fn add_to(self, ui: &mut ElementList); } impl UiElementListExt for T { - fn add_to(self, list: &mut ElementList) { - list.add(self) + fn add_to(self, ui: &mut ElementList) { + ui.add(self) } }