fn key_down_event(
        &mut self,
        _ctx: &mut Context,
        keycode: KeyCode,
        _keymod: KeyMods,
        _repeat: bool,
    ) {
        self.joystick = match keycode {
            KeyCode::Left => -1,
            KeyCode::Right => 1,
            _ => 0,
        };
    }
/// key_down_event gets fired when a key gets pressed.
key_down_event gets fired when a key gets pressed.
key_down_event gets fired when a key gets pressed .
fn key_down_event(
        &mut self,
        _ctx: &mut Context,
        keycode: KeyCode,
        _keymod: KeyMods,
        _repeat: bool,
    ) {
        self.joystick = match keycode {
            KeyCode::Left => -1,
            KeyCode::Right => 1,
            _ => 0,
        };
    }
fn key_down_event ( & mut self , _ctx : & mut Context , keycode : KeyCode , _keymod : KeyMods , _repeat : bool , ) { self . joystick = match keycode { KeyCode :: Left => - 1 , KeyCode :: Right => 1 , _ => 0 , } ; }
key_down_event gets fired when a key gets pressed.
key_down_event gets fired when a key gets pressed .
&mut self
_ctx
&mut Context
keycode
KeyCode
_keymod
KeyMods
_repeat
bool
&mut self
_ctx
&mut Context
keycode
KeyCode
_keymod
KeyMods
_repeat
bool