pub struct Touch { /* private fields */ }Expand description
Represents a touch input or mouse click event.
Implementations§
Source§impl Touch
impl Touch
Sourcepub fn set_enabled(&mut self, val: bool)
pub fn set_enabled(&mut self, val: bool)
Sets whether touch input is enabled or not.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Gets whether touch input is enabled or not.
Sourcepub fn is_first(&self) -> bool
pub fn is_first(&self) -> bool
Gets whether this is the first touch event when multi-touches exist.
Sourcepub fn get_delta(&self) -> Vec2
pub fn get_delta(&self) -> Vec2
Gets the amount and direction of movement since the last touch event.
Sourcepub fn get_location(&self) -> Vec2
pub fn get_location(&self) -> Vec2
Gets the location of the touch event in the node’s local coordinate system.
Sourcepub fn get_world_location(&self) -> Vec2
pub fn get_world_location(&self) -> Vec2
Gets the location of the touch event in the world coordinate system.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Touch
impl RefUnwindSafe for Touch
impl Send for Touch
impl Sync for Touch
impl Unpin for Touch
impl UnwindSafe for Touch
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