From ea3d830c4f6c71ea18ebca07418567a6adf2a872 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 6 Oct 2011 04:01:41 +0200 Subject: NEWT/Android: Add BUTTON1 for one-pointer events --- .../jogamp/newt/driver/android/event/AndroidNewtEventFactory.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/newt') diff --git a/src/newt/classes/jogamp/newt/driver/android/event/AndroidNewtEventFactory.java b/src/newt/classes/jogamp/newt/driver/android/event/AndroidNewtEventFactory.java index 9661fc7fb..ecf1f72cd 100644 --- a/src/newt/classes/jogamp/newt/driver/android/event/AndroidNewtEventFactory.java +++ b/src/newt/classes/jogamp/newt/driver/android/event/AndroidNewtEventFactory.java @@ -28,6 +28,8 @@ package jogamp.newt.driver.android.event; +import java.awt.event.MouseEvent; + import com.jogamp.common.util.IntIntHashMap; import com.jogamp.newt.Window; @@ -163,7 +165,7 @@ public class AndroidNewtEventFactory { (null==newtSource)?null:(Object)newtSource, event.getEventTime(), modifiers , x, y, pressure, pointers, clickCount, - 0, rotation); + pointers.length==1 ? MouseEvent.BUTTON1 : 0, rotation); if(type == com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_RELEASED) { com.jogamp.newt.event.MouseEvent me2 = @@ -172,7 +174,7 @@ public class AndroidNewtEventFactory { (null==newtSource)?null:(Object)newtSource, event.getEventTime(), modifiers , x, y, pressure, pointers, clickCount, - 0, rotation); + pointers.length==1 ? MouseEvent.BUTTON1 : 0, rotation); res = new com.jogamp.newt.event.MouseEvent[2]; res[0] = me1; res[1] = me2; -- cgit v1.2.3