Skip to main content

euv_engine/input/
enum.rs

1use super::*;
2
3/// Represents a standard mouse button identifier.
4#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
5pub enum MouseButton {
6    /// The left mouse button (button 0).
7    #[default]
8    Left,
9    /// The middle mouse button / scroll wheel click (button 1).
10    Middle,
11    /// The right mouse button (button 2).
12    Right,
13    /// Mouse button 3 (browser back).
14    Button4,
15    /// Mouse button 4 (browser forward).
16    Button5,
17}
18
19/// Represents a high-level input action category.
20#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
21pub enum InputAction {
22    /// The key or button was pressed during this frame.
23    #[default]
24    Pressed,
25    /// The key or button is currently held down.
26    Held,
27    /// The key or button was released during this frame.
28    Released,
29    /// The key or button is currently idle (not pressed).
30    Idle,
31}