diff options
author | Sven Gothel <[email protected]> | 2011-10-06 04:01:41 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-10-06 04:01:41 +0200 |
commit | ea3d830c4f6c71ea18ebca07418567a6adf2a872 (patch) | |
tree | d9e4df2929153b0627ebb68da5304a8a70c438c4 | |
parent | a5b73c63005a4b8697c93d22ad82720981dd1146 (diff) |
NEWT/Android: Add BUTTON1 for one-pointer events
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/android/event/AndroidNewtEventFactory.java | 6 |
1 files changed, 4 insertions, 2 deletions
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; |