https://github.com/ickshonpe/bevy_windows_param
https://github.com/ickshonpe/bevy_windows_param
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ickshonpe/bevy_windows_param
- Owner: ickshonpe
- License: mit
- Created: 2023-05-10T17:37:43.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-10T20:17:59.000Z (about 3 years ago)
- Last Synced: 2026-02-14T04:53:08.503Z (4 months ago)
- Language: Rust
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bevy_windows_param
[](https://crates.io/crates/bevy_windows_param)
[](https://github.com/ickshonpe/bevy_windows_param)
[](https://crates.io/crates/bevy_windows_param)
`bevy_windows_param::Windows` is a Bevy `SystemParam` providing a more ergonomic interface for accessing window-specific information, like resolutions and cursor positions."
The implemented methods include:
* `get_window`: Retrieves a `Window`
* `resolution`: Returns the logical resolution of a window
* `physical_resolution`: Returns the physical resolution of a window
* `scale_factor`: Returns the scale factor of a window
* `cursor_position`: Determines the window over which the cursor is positioned, as well as the cursor's location within that window.
* `ui_cursor_position`: Similar to `cursor_position`, but returns the cursor's position in UI coordinates.
* `world_cursor_position`: Similar to `cursor_position`, but returns the cursor's position in world coordinates.
Supports Bevy version 0.10
## Examples
* ```cargo run --example cursor_position```
* ```cargo run --example multiple_windows```