Struct rusty_engine::mouse::MouseWheelState
source · pub struct MouseWheelState {
pub y: f32,
pub x: f32,
}
Expand description
A simplification of mouse wheel events over a frame into a single state. Unless you are treating
the mouse wheel as if scrolling were equivalent to clicking a mouse button, you probably want to
use Engine::mouse_wheel_events
instead.
Fields§
§y: f32
The y component of the mouse wheel movement. This is the “normal” scrolling direction of a
typical mouse wheel. This will be either -1.0
, 0.0
, or 1.0
. For fine-grained
mouse wheel info, see
Engine::mouse_wheel_events
instead.
x: f32
The x component of the mouse wheel movement. This is usually caused by holding the shift key
while scrolling the mouse on regular mice, or by a horizontal scroll wheel on exotic mice.
This will be either -1.0
, 0.0
, or 1.0
. For fine-grained mouse wheel info, see
Engine::mouse_wheel_events
instead.
Trait Implementations§
source§impl Clone for MouseWheelState
impl Clone for MouseWheelState
source§fn clone(&self) -> MouseWheelState
fn clone(&self) -> MouseWheelState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MouseWheelState
impl Debug for MouseWheelState
source§impl Default for MouseWheelState
impl Default for MouseWheelState
source§fn default() -> MouseWheelState
fn default() -> MouseWheelState
source§impl PartialEq for MouseWheelState
impl PartialEq for MouseWheelState
source§fn eq(&self, other: &MouseWheelState) -> bool
fn eq(&self, other: &MouseWheelState) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for MouseWheelState
impl StructuralPartialEq for MouseWheelState
Auto Trait Implementations§
impl RefUnwindSafe for MouseWheelState
impl Send for MouseWheelState
impl Sync for MouseWheelState
impl Unpin for MouseWheelState
impl UnwindSafe for MouseWheelState
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist.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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self
using data from the given World
.