Enum primitives::prelude::JoypadTouch
source · [−]Expand description
Representing the touch input modes for a Touchscreen Joypad for use in the Joypad
virtual controller.
Variants
Disabled
Touch input is disabled for joypad. The default. It is advised that JoypadTouch be set in Factory based on device interrogation.
Dpad
The screen is split into five fixed position regions corresponding to directions, only one can be down at a time. A single fire button (primary) is located in the center.
Joystick
Fields
distance: i32
Distance value
A self centering joystick represented by a constant drag / touch. A drag can begin anywhere. Distance sets the minimum vector length that determines movement. 20 pixels is the default. If the horizontal drag vector is > distance then left or right is down. If the vertical drag vector is > distance then up or down is down. Any tap of less than 200ms triggers primary down.
Swipe
Fields
speed: i32
Swipe speed value
A swipe can begin anywhere. Speed sets the minimum vector length (pixels per second) that determines movement. 100 pixels is the default. If the horizontal swipe vector is > speed then left or right is down. If the vertical swipe vector is > speed then up or down is down. Any tap of less than 200ms triggers primary down.
Trait Implementations
sourceimpl Clone for JoypadTouch
impl Clone for JoypadTouch
sourcefn clone(&self) -> JoypadTouch
fn clone(&self) -> JoypadTouch
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for JoypadTouch
impl Debug for JoypadTouch
sourceimpl PartialEq<JoypadTouch> for JoypadTouch
impl PartialEq<JoypadTouch> for JoypadTouch
sourcefn eq(&self, other: &JoypadTouch) -> bool
fn eq(&self, other: &JoypadTouch) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &JoypadTouch) -> bool
fn ne(&self, other: &JoypadTouch) -> bool
This method tests for !=
.
impl Copy for JoypadTouch
impl Eq for JoypadTouch
impl StructuralEq for JoypadTouch
impl StructuralPartialEq for JoypadTouch
Auto Trait Implementations
impl RefUnwindSafe for JoypadTouch
impl Send for JoypadTouch
impl Sync for JoypadTouch
impl Unpin for JoypadTouch
impl UnwindSafe for JoypadTouch
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more