bevy/crates/bevy_input/src/mouse.rs

21 lines
354 B
Rust
Raw Normal View History

2020-04-05 06:42:39 +00:00
use super::keyboard::ElementState;
#[derive(Debug, Clone)]
2020-04-05 07:32:53 +00:00
pub struct MouseButtonInput {
2020-04-05 06:42:39 +00:00
pub button: MouseButton,
pub state: ElementState,
}
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
pub enum MouseButton {
Left,
Right,
Middle,
Other(u8),
2020-04-05 07:32:53 +00:00
}
#[derive(Debug, Clone)]
pub struct MouseMotion {
pub delta: (f64, f64),
2020-04-06 23:15:59 +00:00
}