pub enum PickEvent {
Press {
world: Vec2,
screen: [f32; 2],
button: PointerButton,
},
Click {
world: Vec2,
screen: [f32; 2],
button: PointerButton,
},
Release {
world: Vec2,
screen: [f32; 2],
button: PointerButton,
},
Hover {
world: Vec2,
screen: [f32; 2],
},
TouchDown {
id: u64,
screen: [f32; 2],
},
TouchMove {
id: u64,
screen: [f32; 2],
},
TouchUp {
id: u64,
},
}Variants§
Press
Click
Release
Pointer released, always. PickEvent::Click is gated behind
click_within_slop_dp, so a drag that ends far from where it started
emits no click at all; a game that drags something has no other way to
learn that the drag ended. Emitted before PickEvent::Click, and
whether or not a click follows.
Hover
Fields
TouchDown
Touch/pen contact began: pointer id + window-physical px.
Mouse does not emit these; taps still emit Click too.
TouchMove
Touch/pen contact moved (same coordinate space as TouchDown).
TouchUp
Touch/pen contact ended (up / leave).
Auto Trait Implementations§
impl Freeze for PickEvent
impl RefUnwindSafe for PickEvent
impl Send for PickEvent
impl Sync for PickEvent
impl Unpin for PickEvent
impl UnsafeUnpin for PickEvent
impl UnwindSafe for PickEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.