handle horizontal scrolling on mac

macos-click-through
Keith Simmons 3 years ago
parent d62f008843
commit f517cf0a68

@ -236,8 +236,8 @@ impl GlutinWindowWrapper {
}
let vertical_input_type = match y {
_ if y > 0.0 => Some("up"),
_ if y < 0.0 => Some("down"),
_ if y > 1.8 => Some("up"),
_ if y < -1.8 => Some("down"),
_ => None,
};
@ -251,9 +251,9 @@ impl GlutinWindowWrapper {
.ok();
}
let horizontal_input_type = match y {
_ if x > 0.0 => Some("right"),
_ if x < 0.0 => Some("left"),
let horizontal_input_type = match x {
_ if x > 1.8 => Some("right"),
_ if x < -1.8 => Some("left"),
_ => None,
};
@ -334,7 +334,7 @@ impl GlutinWindowWrapper {
..
},
..
} => self.handle_mouse_wheel(0.0, logical_position.y as f32),
} => self.handle_mouse_wheel(logical_position.x as f32, logical_position.y as f32),
Event::WindowEvent {
event:
WindowEvent::MouseInput {

Loading…
Cancel
Save