From 9b721afd975792632e897ce7972d254e488dc323 Mon Sep 17 00:00:00 2001 From: Thomas Kunze Date: Thu, 24 Mar 2022 20:26:48 +0100 Subject: [PATCH] longtouch + doubletap --- .../rptools/maptool/client/tool/PointerTool.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/rptools/maptool/client/tool/PointerTool.java b/src/main/java/net/rptools/maptool/client/tool/PointerTool.java index c62a808d74..7fb6ac52f9 100644 --- a/src/main/java/net/rptools/maptool/client/tool/PointerTool.java +++ b/src/main/java/net/rptools/maptool/client/tool/PointerTool.java @@ -328,7 +328,7 @@ public boolean tap(float x, float y, int count, int button) { tapPoint.x = (int) x; tapPoint.y = (int) y; - handleSingleSelectAt(tapPoint, true); + handleSingleSelectAt(tapPoint, count >= 2); repaintZone(); return false; } @@ -336,19 +336,19 @@ public boolean tap(float x, float y, int count, int button) { @Override public boolean longPress(float x, float y) { log.info("longPress"); - return false; - /* + // return false; + var tapPoint = new Point(); tapPoint.x = (int) x; tapPoint.y = (int) y; handleSingleSelectAt(tapPoint, false); // if we open popup stop handling this touch - if(showTokenPopupAt(tapPoint)) { + if (showTokenPopupAt(tapPoint)) { return true; } startSelectionBox(tapPoint); - return false;*/ + return false; } @Override @@ -771,6 +771,8 @@ private void hideMarkerPopup() { // Mouse @Override public void mousePressed(MouseEvent e) { + log.info("mousePressed " + e.toString()); + super.mousePressed(e); if (handledByHover(e.getPoint())) return; @@ -859,6 +861,7 @@ public void mousePressed(MouseEvent e) { // @Override public void mouseReleased(MouseEvent e) { + log.info("mouseReleased " + e.toString()); mouseButtonDown = false; // System.out.println("mouseReleased " + e.toString()); @@ -990,6 +993,7 @@ public void popupMenuCanceled(PopupMenuEvent popupMenuEvent) {} // MouseMotion @Override public void mouseMoved(MouseEvent e) { + log.info("mouseMoved " + e.toString()); if (renderer == null) { return; } @@ -1061,6 +1065,7 @@ public void mouseMoved(MouseEvent e) { // @Override public void mouseDragged(MouseEvent e) { + log.info("mouseDragged " + e.toString()); mouseX = e.getX(); mouseY = e.getY();