[egui] include_image don't work

⚓ Rust    📅 2025-05-14    👤 surdeus    👁️ 7      

surdeus

Warning

This post was published 99 days ago. The information described in this article may have changed.

For some reason, this macros don't work. The code complied so it sees the image (that means I wrote a correct path). But I get this:

image

I tried two ways to show an image

1 ->

ui.add(ImageButton::new(include_image!("../../resources/images/logo.png")));

2 (I was hoping size limitation will work) ->

ui.add_sized([window_size.x * 0.1, header_height],ImageButton::new(include_image!("../../resources/images/logo.png")));

1 post - 1 participant

Read full topic

🏷️ rust_feed