summaryrefslogtreecommitdiffstats
path: root/core/src/mouse
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/mouse')
-rw-r--r--core/src/mouse/click.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/mouse/click.rs b/core/src/mouse/click.rs
index 4a7d796c..6f3844be 100644
--- a/core/src/mouse/click.rs
+++ b/core/src/mouse/click.rs
@@ -24,7 +24,7 @@ pub enum Kind {
}
impl Kind {
- fn next(&self) -> Kind {
+ fn next(self) -> Kind {
match self {
Kind::Single => Kind::Double,
Kind::Double => Kind::Triple,
@@ -61,6 +61,11 @@ impl Click {
self.kind
}
+ /// Returns the position of the [`Click`].
+ pub fn position(&self) -> Point {
+ self.position
+ }
+
fn is_consecutive(&self, new_position: Point, time: Instant) -> bool {
let duration = if time > self.time {
Some(time - self.time)