pub struct StickDef {
pub press_percent: u8,
pub release_percent: u8,
}Expand description
How far a stick must be pushed to count as a held direction
(Button::LeftStickUp and the rest), in percent of its full travel.
release_percent is below press_percent, so a stick resting near the
edge of the dead zone doesn’t flicker.
Fields§
§press_percent: u8A direction starts once the stick is pushed at least this far.
release_percent: u8A held direction ends once the stick falls below this.
Trait Implementations§
impl Copy for StickDef
Source§impl<'de> Deserialize<'de> for StickDef
impl<'de> Deserialize<'de> for StickDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StickDef
impl StructuralPartialEq for StickDef
Auto Trait Implementations§
impl Freeze for StickDef
impl RefUnwindSafe for StickDef
impl Send for StickDef
impl Sync for StickDef
impl Unpin for StickDef
impl UnsafeUnpin for StickDef
impl UnwindSafe for StickDef
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