diff options
author | 2020-04-30 04:53:15 +0200 | |
---|---|---|
committer | 2020-04-30 04:53:15 +0200 | |
commit | e55cd9652e7c7aea4dc2c6ccb83769246d1a808e (patch) | |
tree | 6383563bab65b5feed50873c447a40da929d90bf /core | |
parent | e139aae1439d362ada017a05c9554eaae0883888 (diff) | |
download | iced-e55cd9652e7c7aea4dc2c6ccb83769246d1a808e.tar.gz iced-e55cd9652e7c7aea4dc2c6ccb83769246d1a808e.tar.bz2 iced-e55cd9652e7c7aea4dc2c6ccb83769246d1a808e.zip |
Split `Input` mouse event by `ButtonState`
Diffstat (limited to 'core')
-rw-r--r-- | core/src/mouse/event.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/core/src/mouse/event.rs b/core/src/mouse/event.rs index 52e9d851..2f07b207 100644 --- a/core/src/mouse/event.rs +++ b/core/src/mouse/event.rs @@ -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 { |