Add window::Event::Moved

This commit is contained in:
Cory Forsstrom 2021-07-26 12:36:13 -07:00
parent dc0b96ce40
commit 81eb3c276d
2 changed files with 14 additions and 0 deletions

View file

@ -130,6 +130,12 @@ pub fn window_event(
WindowEvent::Touch(touch) => {
Some(Event::Touch(touch_event(*touch, scale_factor)))
}
WindowEvent::Moved(position) => {
let winit::dpi::LogicalPosition { x, y } =
position.to_logical(scale_factor);
Some(Event::Window(window::Event::Moved { x, y }))
}
_ => None,
}
}