mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 06:41:31 +11:00
Merge pull request #164 from glennw/scroll-wheel
Add scroll wheel events for mac.
This commit is contained in:
commit
9434811328
|
@ -23,7 +23,7 @@ use std::mem;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use std::sync::atomic::{AtomicBool, Relaxed};
|
use std::sync::atomic::{AtomicBool, Relaxed};
|
||||||
|
|
||||||
use events::Event::{MouseInput, MouseMoved, ReceivedCharacter, KeyboardInput};
|
use events::Event::{MouseInput, MouseMoved, ReceivedCharacter, KeyboardInput, MouseWheel};
|
||||||
use events::ElementState::{Pressed, Released};
|
use events::ElementState::{Pressed, Released};
|
||||||
use events::MouseButton::{LeftMouseButton, RightMouseButton};
|
use events::MouseButton::{LeftMouseButton, RightMouseButton};
|
||||||
use events;
|
use events;
|
||||||
|
@ -338,7 +338,7 @@ impl Window {
|
||||||
events.push(alt_modifier.unwrap());
|
events.push(alt_modifier.unwrap());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
NSScrollWheel => { },
|
NSScrollWheel => { events.push(MouseWheel(-event.scrollingDeltaY() as i32)); },
|
||||||
NSOtherMouseDown => { },
|
NSOtherMouseDown => { },
|
||||||
NSOtherMouseUp => { },
|
NSOtherMouseUp => { },
|
||||||
NSOtherMouseDragged => { },
|
NSOtherMouseDragged => { },
|
||||||
|
|
Loading…
Reference in a new issue