From 56322e1cf41bbb5bcc097164fb3ddcc0061c1c73 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 17 Oct 2013 04:56:31 +0200 Subject: MouseEvent: Clarify 'Multiple-Pointer' w/ button[mask] semantics, ; InputEvent: getButtonDownCount() and isAnyButtonDown(); - Clarify 'Multiple-Pointer' w/ button[mask] semantics - Pointer IDs start w/ 0 and are consecutive numbers. - 'button' == triggering pointer-ID - buttonMask in modifiers show pressed button _and_ pointer-IDs - deprecated BUTTON_NUMBER -> use BUTTON_COUNT (name semantics) --- src/test/com/jogamp/opengl/test/android/MovieCubeActivity0.java | 2 +- src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java | 2 +- .../jogamp/opengl/test/junit/newt/event/BaseNewtEventModifiers.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test/com/jogamp/opengl') diff --git a/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0.java b/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0.java index 3d83bfd2c..ec8fa1000 100644 --- a/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0.java +++ b/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0.java @@ -61,7 +61,7 @@ public class MovieCubeActivity0 extends NewtBaseActivity { MouseAdapter showKeyboardMouseListener = new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { - if( e.getPointerCount() == 4 && e.getPressure(true) > 0.7f ) { + if( e.getPointerCount() == 4 && e.getPressure(0, true) > 0.7f ) { ((com.jogamp.newt.Window) e.getSource()).setKeyboardVisible(true); } } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java index 50037ebf3..53c813563 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java @@ -488,7 +488,7 @@ public class GearsES2 implements GLEventListener, TileRendererBase.TileRendererL prevMouseY = e.getY(); } else if( e.getPointerCount() == 4 ) { final Object src = e.getSource(); - if( e.getPressure(true) > 0.7f && src instanceof Window) { // show Keyboard + if( e.getPressure(0, true) > 0.7f && src instanceof Window) { // show Keyboard ((Window) src).setKeyboardVisible(true); } } diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/BaseNewtEventModifiers.java b/src/test/com/jogamp/opengl/test/junit/newt/event/BaseNewtEventModifiers.java index da09757c5..44d6a2dec 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/BaseNewtEventModifiers.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/BaseNewtEventModifiers.java @@ -300,8 +300,8 @@ public abstract class BaseNewtEventModifiers extends UITestCase { _numButtonsToTest = 3 ; { - if( _numButtonsToTest > com.jogamp.newt.event.MouseEvent.BUTTON_NUMBER ) { - _numButtonsToTest = com.jogamp.newt.event.MouseEvent.BUTTON_NUMBER ; + if( _numButtonsToTest > com.jogamp.newt.event.MouseEvent.BUTTON_COUNT ) { + _numButtonsToTest = com.jogamp.newt.event.MouseEvent.BUTTON_COUNT ; } // These two arrays are assumed to be peers, i.e. are the same -- cgit v1.2.3