[egui] include_image don't work

⚓ rust    📅 2025-05-14    👤 surdeus    👁️ 3      

surdeus

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