bevy/crates/bevy_input/src/mouse.rs

21 lines
368 B
Rust
Raw Normal View History

2020-04-05 06:42:39 +00:00
use super::keyboard::ElementState;
use glam::Vec2;
2020-04-05 06:42:39 +00:00
#[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 MouseMotionInput {
pub delta: Vec2,
}