pub fn resolve_generic_input_event(
        &self,
        event: InputEvent<GenericAxis, GenericButton>,
    ) -> Option<InputEvent<Axes, Buttons>> {
        match event {
            InputEvent::Axis(axis, position) => match axis {
                GenericAxis::Gamepad(gamepad_axis) => {
                    self.resolve_gamepad_axis(gamepad_axis, position)
                }
                GenericAxis::Mouse(scroll_axis) => self.resolve_scroll_axis(scroll_axis, position),
            },
            InputEvent::Button { button, state, .. } => match button {
                GenericButton::Gamepad(gamepad_button) => {
                    self.resolve_gamepad_button(gamepad_button, state)
                }
                GenericButton::KeyCode(keycode, _modifiers) => self.resolve_keycode(keycode, state),
                GenericButton::Mouse(mouse_button, _modifiers) => {
                    self.resolve_mouse_button(mouse_button, state)
                }
                GenericButton::ScanCode(scancode, _modifiers) => {
                    self.resolve_scancode(scancode, state)
                }
            },
            InputEvent::Cursor(position) => Some(InputEvent::Cursor(position)),
        }
    }
/// Convert a generic input event into a logical input.
Convert a generic input event into a logical input.
Convert a generic input event into a logical input .
pub fn resolve_generic_input_event(
        &self,
        event: InputEvent<GenericAxis, GenericButton>,
    ) -> Option<InputEvent<Axes, Buttons>> {
        match event {
            InputEvent::Axis(axis, position) => match axis {
                GenericAxis::Gamepad(gamepad_axis) => {
                    self.resolve_gamepad_axis(gamepad_axis, position)
                }
                GenericAxis::Mouse(scroll_axis) => self.resolve_scroll_axis(scroll_axis, position),
            },
            InputEvent::Button { button, state, .. } => match button {
                GenericButton::Gamepad(gamepad_button) => {
                    self.resolve_gamepad_button(gamepad_button, state)
                }
                GenericButton::KeyCode(keycode, _modifiers) => self.resolve_keycode(keycode, state),
                GenericButton::Mouse(mouse_button, _modifiers) => {
                    self.resolve_mouse_button(mouse_button, state)
                }
                GenericButton::ScanCode(scancode, _modifiers) => {
                    self.resolve_scancode(scancode, state)
                }
            },
            InputEvent::Cursor(position) => Some(InputEvent::Cursor(position)),
        }
    }
pub fn resolve_generic_input_event ( & self , event : InputEvent < GenericAxis , GenericButton > , ) -> Option < InputEvent < Axes , Buttons > > { match event { InputEvent :: Axis ( axis , position ) => match axis { GenericAxis :: Gamepad ( gamepad_axis ) => { self . resolve_gamepad_axis ( gamepad_axis , position ) } GenericAxis :: Mouse ( scroll_axis ) => self . resolve_scroll_axis ( scroll_axis , position ) , } , InputEvent :: Button { button , state , .. } => match button { GenericButton :: Gamepad ( gamepad_button ) => { self . resolve_gamepad_button ( gamepad_button , state ) } GenericButton :: KeyCode ( keycode , _modifiers ) => self . resolve_keycode ( keycode , state ) , GenericButton :: Mouse ( mouse_button , _modifiers ) => { self . resolve_mouse_button ( mouse_button , state ) } GenericButton :: ScanCode ( scancode , _modifiers ) => { self . resolve_scancode ( scancode , state ) } } , InputEvent :: Cursor ( position ) => Some ( InputEvent :: Cursor ( position ) ) , } }
Convert a generic input event into a logical input.
Convert a generic input event into a logical input .
&self
event
InputEvent<GenericAxis, GenericButton>
&self
event
InputEvent<GenericAxis, GenericButton>