@@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
22
33use crate :: Direction ;
44
5- use super :: { EventSource , GamepadEvent , KeyEvent , MidiEvent , MouseEvent , OrientationEvent , UnknownEvent } ;
5+ use super :: { EventSource , GamepadEvent , KeyEvent , MidiEvent , MotionEvent , MouseEvent , OrientationEvent , UnknownEvent } ;
66
77/// A user input event, as generated by the new frontend (LUNA).
88#[ derive( Debug , Serialize , Deserialize , PartialEq , Clone ) ]
@@ -13,6 +13,7 @@ pub enum InputEvent {
1313 Gamepad ( GamepadEvent ) ,
1414 Midi ( MidiEvent ) ,
1515 Orientation ( OrientationEvent ) ,
16+ Motion ( MotionEvent ) ,
1617 #[ serde( untagged) ]
1718 Unknown ( UnknownEvent ) ,
1819}
@@ -25,6 +26,7 @@ impl InputEvent {
2526 InputEvent :: Mouse ( MouseEvent { source, .. } ) => source,
2627 InputEvent :: Gamepad ( GamepadEvent { source, .. } ) => source,
2728 InputEvent :: Orientation ( OrientationEvent { source, .. } ) => source,
29+ InputEvent :: Motion ( MotionEvent { source, .. } ) => source,
2830 InputEvent :: Midi ( MidiEvent { source, .. } ) => source,
2931 InputEvent :: Unknown ( UnknownEvent { source, .. } ) => source,
3032 }
0 commit comments