Adding in more event properties
This commit is contained in:
parent
1490631bf2
commit
ca7e827f74
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "dominator"
|
||||
version = "0.5.2"
|
||||
version = "0.5.3"
|
||||
authors = ["Pauan <pcxunlimited@gmail.com>"]
|
||||
description = "Zero cost declarative DOM library using FRP signals"
|
||||
repository = "https://github.com/Pauan/rust-dominator"
|
||||
|
|
|
@ -57,6 +57,9 @@ macro_rules! make_mouse_event {
|
|||
#[inline] pub fn shift_key(&self) -> bool { self.event.shift_key() }
|
||||
#[inline] pub fn alt_key(&self) -> bool { self.event.alt_key() }
|
||||
|
||||
#[inline] pub fn mouse_x(&self) -> i32 { self.event.client_x() }
|
||||
#[inline] pub fn mouse_y(&self) -> i32 { self.event.client_y() }
|
||||
|
||||
pub fn button(&self) -> MouseButton {
|
||||
match self.event.button() {
|
||||
0 => MouseButton::Left,
|
||||
|
|
Loading…
Reference in New Issue