-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is an implementation within `bevy_window::window` that fixes #12229. # Objective Fixes #12229, allow users to retrieve the window's size and physical size as Vectors without having to manually construct them using `height()` and `width()` or `physical_height()` and `physical_width()` ## Solution As suggested in #12229, created two public functions within `window`: `size() -> Vec` and `physical_size() -> UVec` that return the needed Vectors ready-to-go. ### Discussion My first FOSS PRQ ever, so bear with me a bit. I'm new to this. - I replaced instances of ```Vec2::new(window.width(), window.height());``` or `UVec2::new(window.physical_width(), window.physical_height());` within bevy examples be replaced with their `size()`/`physical_size()` counterparts? - Discussion within #12229 still holds: should these also be added to WindowResolution?
- Loading branch information
1 parent
f9cc91d
commit cc32610
Showing
7 changed files
with
36 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters