bevy_windows_param

Crates.iobevy_windows_param
lib.rsbevy_windows_param
version0.1.1
sourcesrc
created_at2023-05-10 17:38:52.279952
updated_at2023-05-10 20:18:48.280291
descriptionBevy `SystemParam` providing a more ergonomic interface for accessing window-specific information, like resolutions and cursor positions.
homepage
repositoryhttps://github.com/ickshonpe/bevy_windows_param
max_upload_size
id861483
size97,925
(ickshonpe)

documentation

README

bevy_windows_param

crates.io MIT/Apache 2.0 crates.io

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

Commit count: 4

cargo fmt