Skip to content

Commit 029f4a6

Browse files
committed
Add motion events to enum
1 parent 038c18e commit 029f4a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lighthouse-protocol/src/input/input_event.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
22

33
use 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

Comments
 (0)