pub struct GamepadAxisEvent { /* private fields */ }Expand description
Event representing a change in gamepad axis state (eg, pressing a stick in a certain direction).
Implementations§
Source§impl GamepadAxisEvent
impl GamepadAxisEvent
Sourcepub fn new(
lib: Arc<Library>,
index: u32,
axis_index: u32,
value: f64,
) -> Result<GamepadAxisEvent, CreationError>
pub fn new( lib: Arc<Library>, index: u32, axis_index: u32, value: f64, ) -> Result<GamepadAxisEvent, CreationError>
Create a new GamepadAxisEvent.
§Arguments
lib- The ultralight library.index- The index of the gamepad, this should match the value previously set inRenderer::set_gamepad_details.axis_index- The index of the axis whose value has changed. This value should be in the range previously set inRenderer::set_gamepad_details.value- The new value of the axis. This value should be normalized to the range [-1.0, 1.0].
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GamepadAxisEvent
impl RefUnwindSafe for GamepadAxisEvent
impl !Send for GamepadAxisEvent
impl !Sync for GamepadAxisEvent
impl Unpin for GamepadAxisEvent
impl UnwindSafe for GamepadAxisEvent
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