Split Input mouse event by ButtonState

This commit is contained in:
Héctor Ramón Jiménez 2020-04-30 04:53:15 +02:00
parent e139aae143
commit e55cd9652e
11 changed files with 180 additions and 203 deletions

View file

@ -1,5 +1,4 @@
use super::Button;
use crate::ButtonState;
/// A mouse event.
///
@ -24,14 +23,11 @@ pub enum Event {
y: f32,
},
/// A mouse button was pressed or released.
Input {
/// The button identifier
button: Button,
/// A mouse button was pressed.
ButtonPressed(Button),
/// The state of the button
state: ButtonState,
},
/// A mouse button was released.
ButtonReleased(Button),
/// The mouse wheel was scrolled.
WheelScrolled {