Struct ori_core::PointerEvent
source · pub struct PointerEvent {
pub id: u64,
pub position: Vec2,
pub scroll_delta: Vec2,
pub pressed: bool,
pub left: bool,
pub button: Option<PointerButton>,
pub modifiers: Modifiers,
}
Fields§
§id: u64
The unique id of the pointer.
position: Vec2
The position of the pointer.
scroll_delta: Vec2
The delta of the pointer wheel.
pressed: bool
Whether the pointer is pressed.
left: bool
Whether the pointer left the window.
The button that was pressed or released.
modifiers: Modifiers
The modifiers that were active when the event was triggered.
Implementations§
source§impl PointerEvent
impl PointerEvent
sourcepub fn is_pressed(&self, button: PointerButton) -> bool
pub fn is_pressed(&self, button: PointerButton) -> bool
Returns true if button
was pressed.
sourcepub fn is_released(&self, button: PointerButton) -> bool
pub fn is_released(&self, button: PointerButton) -> bool
Returns true if button
was released.
sourcepub fn is_release(&self) -> bool
pub fn is_release(&self) -> bool
Returns true if any button was released.
Trait Implementations§
source§impl Clone for PointerEvent
impl Clone for PointerEvent
source§fn clone(&self) -> PointerEvent
fn clone(&self) -> PointerEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PointerEvent
impl Debug for PointerEvent
source§impl Default for PointerEvent
impl Default for PointerEvent
source§fn default() -> PointerEvent
fn default() -> PointerEvent
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for PointerEvent
impl Send for PointerEvent
impl Sync for PointerEvent
impl Unpin for PointerEvent
impl UnwindSafe for PointerEvent
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<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
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()
.source§impl<T> Styleable<T> for T
impl<T> Styleable<T> for T
source§fn styled(self) -> Styled<T>
fn styled(self) -> Styled<T>
Converts the
self
into a Styled<Self>
value.source§fn attr_trans(
self,
key: &str,
value: impl Into<StyleAttributeValue>,
transition: impl Into<StyleTransition>
) -> Styled<T>
fn attr_trans( self, key: &str, value: impl Into<StyleAttributeValue>, transition: impl Into<StyleTransition> ) -> Styled<T>
Adds an attribute with a transition.