pub struct GlobalState {Show 21 fields
pub mouse_wheel: (f32, f32),
pub mouse_position: Vec2,
pub mouse_rel: IVec2,
pub mouse_world: Vec2,
pub mouse_moved_this_frame: bool,
pub mouse_input_this_frame: bool,
pub mouse_locked: bool,
pub cursor_hidden: bool,
pub egui_scale_factor: f32,
pub frame: u32,
pub fps: i32,
pub clear_color: Color,
pub screen_size: Vec2,
pub pressed: HashSet<KeyCode>,
pub just_pressed: HashSet<KeyCode>,
pub just_released: HashSet<KeyCode>,
pub mouse_pressed: HashSet<MouseButton>,
pub mouse_just_pressed: HashSet<MouseButton>,
pub mouse_just_released: HashSet<MouseButton>,
pub play_sound_queue: Vec<Sound>,
pub stop_sound_queue: Vec<Sound>,
}
Fields§
§mouse_wheel: (f32, f32)
§mouse_position: Vec2
§mouse_rel: IVec2
§mouse_world: Vec2
§mouse_moved_this_frame: bool
§mouse_input_this_frame: bool
§mouse_locked: bool
§egui_scale_factor: f32
§frame: u32
§fps: i32
§clear_color: Color
§screen_size: Vec2
§pressed: HashSet<KeyCode>
§just_pressed: HashSet<KeyCode>
§just_released: HashSet<KeyCode>
§mouse_pressed: HashSet<MouseButton>
§mouse_just_pressed: HashSet<MouseButton>
§mouse_just_released: HashSet<MouseButton>
§play_sound_queue: Vec<Sound>
§stop_sound_queue: Vec<Sound>
Trait Implementations§
Source§impl Default for GlobalState
impl Default for GlobalState
Source§fn default() -> GlobalState
fn default() -> GlobalState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GlobalState
impl RefUnwindSafe for GlobalState
impl Send for GlobalState
impl Sync for GlobalState
impl Unpin for GlobalState
impl UnwindSafe for GlobalState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.