From 0a7392684a8fbe69b7bc046a91d5a4622f566490 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Mon, 26 Feb 2024 01:20:52 +0100 Subject: [PATCH] a --- hui-examples/examples/modern_testbed.rs | 4 +++- hui/src/element.rs | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) 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) } }