Open
Description
What problem does this solve or what need does it fill?
I want to add a VideoMode
selector to my settings menu. However, there is no way to get a list of supported video modes, because that information lives in Monitor::video_modes
, but there's no link from a window to the monitor it's currently on.
What solution would you like?
Expose a window's current monitor index or entity via a Window::monitor
or current_monitor
field or getter method, or a separate component / relationship. I believe winit has this information.
What alternative(s) have you considered?
- Include a
Monitor
selector in the settings menu as well, and populate video modes based on the selected monitor. This works, but is not the UX we want. Also the selected monitor shown in the settings menu may confusingly become out of sync with the actual monitor if the user moves the window, because there's no way to check if it's still correct. - Iterate over monitors to find one that contains the window's position within its extents. This probably works, but is hacky so it may not work on every platform, and it's not a suitable solution for
bevy_new_2d
.
Additional context
This came up while working on bevy_new_2d
.