pub enum JoypadTouch {
Disabled,
Dpad,
Joystick {
distance: i32,
},
Swipe {
speed: i32,
},
}
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
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
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§
Source§impl Clone for JoypadTouch
impl Clone for JoypadTouch
Source§fn clone(&self) -> JoypadTouch
fn clone(&self) -> JoypadTouch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more