mousewheel

This commit is contained in:
2019-07-27 18:52:16 +02:00
parent 21d642ec59
commit d53170c5ce
4 changed files with 51 additions and 11 deletions

View File

@@ -83,6 +83,18 @@ impl Game for TestGame {
}
self.input.on_mouse_event(state, button, modifiers);
},
Event::WindowEvent { event: WindowEvent::MouseWheel { device_id, delta, phase, modifiers }, .. } => {
if self.log_config.input {
let mods = mods_to_string(modifiers);
if mods.len() > 0 {
println!("Scroll {:?} {:?} {:?} + {:?}", device_id, phase, &mods, delta)
} else {
println!("Scroll {:?} {:?} {:?}", device_id, phase, delta)
}
}
self.input.on_mouse_wheel_event(&delta, &modifiers);
}
_ => {}
}