2 releases
0.1.1 | May 10, 2023 |
---|---|
0.1.0 | May 10, 2023 |
#2524 in Game dev
25KB
177 lines
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 aWindow
resolution
: Returns the logical resolution of a windowphysical_resolution
: Returns the physical resolution of a windowscale_factor
: Returns the scale factor of a windowcursor_position
: Determines the window over which the cursor is positioned, as well as the cursor's location within that window.ui_cursor_position
: Similar tocursor_position
, but returns the cursor's position in UI coordinates.world_cursor_position
: Similar tocursor_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
Dependencies
~20–56MB
~1M SLoC