Remove ButtonState
This commit is contained in:
parent
e55cd9652e
commit
d8b9e03481
5 changed files with 1 additions and 28 deletions
|
|
@ -5,7 +5,7 @@
|
|||
use crate::{
|
||||
input::{
|
||||
keyboard::{self, KeyCode, ModifiersState},
|
||||
mouse, ButtonState,
|
||||
mouse,
|
||||
},
|
||||
window, Event, Mode, MouseCursor,
|
||||
};
|
||||
|
|
@ -157,17 +157,6 @@ pub fn mouse_button(mouse_button: winit::event::MouseButton) -> mouse::Button {
|
|||
}
|
||||
}
|
||||
|
||||
/// Converts an `ElementState` from [`winit`] to an [`iced_native`] button state.
|
||||
///
|
||||
/// [`winit`]: https://github.com/rust-windowing/winit
|
||||
/// [`iced_native`]: https://github.com/hecrj/iced/tree/master/native
|
||||
pub fn button_state(element_state: winit::event::ElementState) -> ButtonState {
|
||||
match element_state {
|
||||
winit::event::ElementState::Pressed => ButtonState::Pressed,
|
||||
winit::event::ElementState::Released => ButtonState::Released,
|
||||
}
|
||||
}
|
||||
|
||||
/// Converts some `ModifiersState` from [`winit`] to an [`iced_native`]
|
||||
/// modifiers state.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue