Closed lesleyrs closed 7 months ago
I just used the bevy book for this, it consists of 2 parts:
~There's just 1 problem with this now, winit doesn't load the image when used as a dependency like in the template or running the executable instead of cargo run. So the image has to be loaded in another way, need some help here @jjant.~
Never mind it works with relative path :D
Ok this is ready for merge if it looks fine on Linux
~There's 1 small problem on windows where the icon in command prompt is low resolution. I tried various things to fix but didn't work, made an issue for it here: https://github.com/nabijaczleweli/rust-embed-resource/issues/56~
Fixed by only using 256x256 in .ico
Ok now I'm really done @jjant.
Description
Created a 256x256 ico with ImageMagick, using other sizes made cmd icon blurry (directly from logo.png, I reverted the trimmed image it was too big imo). Resized so it's like 1 kb smaller. Kept the logo at 256x256 since it's a better default size unless you have a reason for it to be 240?
Works for examples and game-template:
Side notes:
How do you get desktop icons on Linux? Title bar and task bar should be working there as well with winit but haven't checked myself.
What's the difference between importing glutin::window::Icon and winit::window::Icon? rust analyzer only shows glutin but I just did winit since you already used winit imports.
I'm not sure what this means but I haven't noticed any problems: https://github.com/nabijaczleweli/rust-embed-resource/tree/v1.8.0#errata
Unrelated to this PR but why did you decide using --bin over --example? Is it to avoid them being compiled in tests? Just curious, that's the only difference I see. https://doc.rust-lang.org/cargo/reference/cargo-targets.html#binaries
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.