use bevy::prelude::{GamepadAxisType, Reflect};
use serde::{Deserialize, Serialize};
use crate::bindings::{BinaryInput, Threshold};
#[derive(Debug, Serialize, Deserialize, Reflect, Clone, PartialEq, Eq, Hash)]
pub enum AnalogInput {
ScrollWheelX,
ScrollWheelY,
MouseMotionX,
MouseMotionY,
GamePad(GamepadAxisType),
GamePadLeftTrigger2,
GamePadRightTrigger2,
}
impl AnalogInput {
pub fn at_threshold(self, threshold: Threshold) -> BinaryInput {
BinaryInput::Axis(self, threshold)
}
}