Split Input mouse event by ButtonState
This commit is contained in:
parent
e139aae143
commit
e55cd9652e
11 changed files with 180 additions and 203 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue