What problem does this solve or what need does it fill?
Users often need to set specific window resolutions. For example, a player will probably want a dropdown menu for a 3D game to tweak the resolution. A game designer might want to use a specific resolution for stylistic reasons. This is also relevant for 2D camera setups, see this chapter of the cheatbook.
As a result, lots of Bevy users will need to define their own resolution constants, resulting in unnecessary boilerplate.
What solution would you like?
Add resolution constants somewhere. My suggestion is adding constructors to WindowResolution like this:
let lowres = WindowResolution::from_360p();
let highres = WindowResolution::from_2k();
// etc.
But other options like associated constants would also work
What alternative(s) have you considered?
Leave it as is. Users can copy-paste their own resolution constants or create a third-party crate.
Additional context
We don't need to add all resolutions, that would be way too much. But something like the 10 most common ones should be feasible.
This issue was originally raised by @Sapein on Discord
What problem does this solve or what need does it fill?
Users often need to set specific window resolutions. For example, a player will probably want a dropdown menu for a 3D game to tweak the resolution. A game designer might want to use a specific resolution for stylistic reasons. This is also relevant for 2D camera setups, see this chapter of the cheatbook. As a result, lots of Bevy users will need to define their own resolution constants, resulting in unnecessary boilerplate.
What solution would you like?
Add resolution constants somewhere. My suggestion is adding constructors to
WindowResolution
like this:But other options like associated constants would also work
What alternative(s) have you considered?
Leave it as is. Users can copy-paste their own resolution constants or create a third-party crate.
Additional context
We don't need to add all resolutions, that would be way too much. But something like the 10 most common ones should be feasible.
This issue was originally raised by @Sapein on Discord