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