Expose a count field on Event::LeftMouseDown

This commit is contained in:
Antonio Scandurra 2021-11-23 16:18:17 +01:00
parent e1d4bcf013
commit 005a7076af
2 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@ pub enum Event {
LeftMouseDown {
position: Vector2F,
cmd: bool,
count: usize,
},
LeftMouseUp {
position: Vector2F,

View File

@ -94,6 +94,7 @@ impl Event {
cmd: native_event
.modifierFlags()
.contains(NSEventModifierFlags::NSCommandKeyMask),
count: native_event.clickCount() as usize,
})
}
NSEventType::NSLeftMouseUp => window_height.map(|window_height| Self::LeftMouseUp {