-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow users to set the window's icon #1031
Comments
hello and welcome! It has not yet been implemented, but it should be possible using winit If you're interested in doing the PR, you could add a field to Ideally it should be available only when running on windows or with X11 as it won't do anything otherwise, but I'm not sure it's possible to select X11 with a config. You could at least only enable it on windows and linux. |
Thanks for the explanation, I'm not sure I have the skills to add it myself, I think it would be better if someone more experienced would do it |
This is a good |
Is anyone working on this? If not, I would like to take a stab at this. |
Sorry for the late answer, no one claims it, so i think you can work on it ^^ |
Will be closed by #2268. |
Oh, should i close this issue then ? |
You can leave it open. Posting the PR number just creates a link between the issue and the PR. When it gets merged the issue will probably be closed 🙂 |
Thank you, i didn't know that 👍 |
This is still incomplete. The work done in #2268 was good, but ended up abandoned without relicensing. When tackling this, you cannot directly reuse that code. |
Just looking through the history of this story —
The first PR is now re-licensed, and an attempt to rebase it off of latest |
I think the latter is a better start, but the most relevant insight from those threads was:
|
Looks like there's a dependency for this story on refactoring out What would the crate be called? What would go into it? |
|
That works. This is what the crate ended up looking like: $ tree bevy_render_primitives
bevy_render_primitives
├── Cargo.toml
└── src
├── color
│ ├── colorspace.rs
│ └── mod.rs
├── lib.rs
├── render_resource
│ ├── mod.rs
│ ├── pipeline.rs
│ ├── resource_macros.rs
│ └── texture.rs
└── texture
├── basis.rs
├── dds.rs
├── image.rs
├── image_texture_conversion.rs
├── ktx2.rs
└── mod.rs
4 directories, 14 files To load the image in a background thread, will I need to add an argument for the asset server here? If so, there will be another circular dependency to untangle, between |
Yeah, that's starting to get real messy. @cart, opinions? Using assets was your idea originally, and you've been mucking around with asset architecture. |
Now that windows are entities, we could probably work around the crate structure issue by adding a We could then write a winit-specific system in If we later find a crate structure we like better, we can revisit. |
@cart, @alice-i-cecile a lot of Bevy's concepts are new to me, and I wasn't sure whether I fully understood the proposal. I've put a draft PR together and wanted to double-check that the basic idea is right before attempting to add a unit test and submitting: #8130. |
If anyone is interested in a temporary solution, I've created a crate for Bevy 0.11.3, for my own use, that allows for updating window icon, using bevy's assets. |
Note that the correct approach for this is very OS specific. See #8130 (comment) |
Hello,
I just started using Bevy and I wanted to start experimenting a bit with a small project, I wanted to put an image as an icon in the game window, but I couldn't find how to do it, even searching in the documentation, I specify that I'm using version 0.3.0 of Bevy, is it me who missed something? Or is this feature not yet implemented?
If it is not implemented, would it be possible to just add a field to the WindowDescriptor resource to specify this icon as it is possible to do it for the window title ?
Thank you in advance for the answers
The text was updated successfully, but these errors were encountered: