Produce cursor events in iced_winit::conversion

This commit is contained in:
Héctor Ramón Jiménez 2020-04-12 00:37:13 +02:00
parent e941eab4ab
commit 4b0cc178dd

View File

@ -27,6 +27,12 @@ pub fn window_event(
height: logical_size.height,
}))
}
WindowEvent::CursorEntered { .. } => {
Some(Event::Mouse(mouse::Event::CursorEntered))
}
WindowEvent::CursorLeft { .. } => {
Some(Event::Mouse(mouse::Event::CursorLeft))
}
WindowEvent::CursorMoved { position, .. } => {
let position = position.to_logical::<f64>(scale_factor);