1
1
Fork 0
mirror of https://github.com/griffi-gh/hUI.git synced 2025-04-13 11:17:21 -05:00

fix broken examples

This commit is contained in:
griffi-gh 2025-02-28 16:35:13 +01:00
parent 7d04d4a244
commit 9332c1e4bd
2 changed files with 4 additions and 4 deletions

View file

@ -31,7 +31,7 @@ ui_main!(
let image = ui.add_image(TextureFormat::Rgba, IMAGE_DATA, 32); let image = ui.add_image(TextureFormat::Rgba, IMAGE_DATA, 32);
(0, image) (0, image)
}, },
run: |ui, size, (ref mut counter, image)| { run: |ui, size, &mut (ref mut counter, image)| {
Container::default() Container::default()
.with_size(size!(100%)) .with_size(size!(100%))
.with_padding(10.) .with_padding(10.)
@ -76,7 +76,7 @@ ui_main!(
.add_child(ui); .add_child(ui);
Break.add_child(ui); Break.add_child(ui);
for _ in 0..*counter { for _ in 0..*counter {
Image::new(*image) Image::new(image)
.with_size(size!(48, 48)) .with_size(size!(48, 48))
.add_child(ui); .add_child(ui);
} }

View file

@ -30,7 +30,7 @@ ui_main!(
let image = ui.add_image(TextureFormat::Rgba, IMAGE_DATA, 32); let image = ui.add_image(TextureFormat::Rgba, IMAGE_DATA, 32);
(0, image) (0, image)
}, },
run: |ui, size, (ref mut counter, image)| { run: |ui, size, &mut (ref mut counter, image)| {
Container::default() Container::default()
.with_size(size!(100%)) .with_size(size!(100%))
.with_padding(10.) .with_padding(10.)
@ -68,7 +68,7 @@ ui_main!(
.add_child(ui); .add_child(ui);
Break.add_child(ui); Break.add_child(ui);
for _ in 0..*counter { for _ in 0..*counter {
Image::new(*image) Image::new(image)
.with_size(size!(48, 48)) .with_size(size!(48, 48))
.add_child(ui); .add_child(ui);
} }