lighthouse-protocol 6.2.1

Protocol types for Project Lighthouse
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use serde::{Deserialize, Serialize};

use super::{GamepadAxis2DEvent, GamepadAxisEvent, GamepadButtonEvent};

/// A control-specific event on a gamepad.
#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
#[serde(tag = "control", rename_all = "camelCase")]
pub enum GamepadControlEvent {
    Button(GamepadButtonEvent),
    Axis(GamepadAxisEvent),
    #[serde(rename = "axis2d")]
    Axis2D(GamepadAxis2DEvent),
}