pub struct GamepadState {Show 36 fields
pub vendor_id: u16,
pub product_id: u16,
pub left_stick: Vec2,
pub right_stick: Vec2,
pub left_trigger_held: bool,
pub left_trigger_pressed: bool,
pub right_trigger_held: bool,
pub right_trigger_pressed: bool,
pub south_held: bool,
pub south_pressed: bool,
pub east_held: bool,
pub east_pressed: bool,
pub west_held: bool,
pub west_pressed: bool,
pub north_held: bool,
pub north_pressed: bool,
pub dpad_left_held: bool,
pub dpad_left_pressed: bool,
pub dpad_up_held: bool,
pub dpad_up_pressed: bool,
pub dpad_right_held: bool,
pub dpad_right_pressed: bool,
pub dpad_down_held: bool,
pub dpad_down_pressed: bool,
pub left_shoulder_held: bool,
pub left_shoulder_pressed: bool,
pub right_shoulder_held: bool,
pub right_shoulder_pressed: bool,
pub start_held: bool,
pub start_pressed: bool,
pub select_held: bool,
pub select_pressed: bool,
pub left_stick_click_held: bool,
pub left_stick_click_pressed: bool,
pub right_stick_click_held: bool,
pub right_stick_click_pressed: bool,
}Fields§
§vendor_id: u16USB vendor and product ids of the pad, 0 where the platform reports
none. Enough to tell a model apart, e.g. a GameCube adapter.
product_id: u16§left_stick: Vec2§right_stick: Vec2§left_trigger_held: bool§left_trigger_pressed: bool§right_trigger_held: bool§right_trigger_pressed: bool§south_held: bool§south_pressed: bool§east_held: bool§east_pressed: bool§west_held: bool§west_pressed: bool§north_held: bool§north_pressed: bool§dpad_left_held: bool§dpad_left_pressed: bool§dpad_up_held: bool§dpad_up_pressed: bool§dpad_right_held: bool§dpad_right_pressed: bool§dpad_down_held: bool§dpad_down_pressed: bool§left_shoulder_held: bool§left_shoulder_pressed: bool§right_shoulder_held: bool§right_shoulder_pressed: bool§start_held: bool§start_pressed: bool§select_held: bool§select_pressed: bool§left_stick_click_held: bool§left_stick_click_pressed: bool§right_stick_click_held: bool§right_stick_click_pressed: boolTrait Implementations§
Source§impl Clone for GamepadState
impl Clone for GamepadState
impl Copy for GamepadState
Source§impl Debug for GamepadState
impl Debug for GamepadState
Auto Trait Implementations§
impl Freeze for GamepadState
impl RefUnwindSafe for GamepadState
impl Send for GamepadState
impl Sync for GamepadState
impl Unpin for GamepadState
impl UnsafeUnpin for GamepadState
impl UnwindSafe for GamepadState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
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>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
Converts
&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)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> FromTemplate for T
impl<T> FromTemplate for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
Uses this template and the given
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clones this template. See
Clone.