diff options
author | Sven Gothel <[email protected]> | 2013-10-17 04:56:31 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-17 04:56:31 +0200 |
commit | 56322e1cf41bbb5bcc097164fb3ddcc0061c1c73 (patch) | |
tree | a1b66bc74216784c2f84b25031d3c82cfc145294 /src/newt/classes/jogamp | |
parent | b831ebadcaea1eea7370f7ec0bffc59eaba7a5ba (diff) |
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)
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r-- | src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java b/src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java index 1e15070f8..d71ad175b 100644 --- a/src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java +++ b/src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java @@ -92,7 +92,7 @@ public class AWTNewtEventFactory { getMaskForButtonMethod = _getMaskForButtonMethod; } */ - awtButtonDownMasks = new int[com.jogamp.newt.event.MouseEvent.BUTTON_NUMBER] ; // java.awt.MouseInfo.getNumberOfButtons() ; + awtButtonDownMasks = new int[com.jogamp.newt.event.MouseEvent.BUTTON_COUNT] ; // java.awt.MouseInfo.getNumberOfButtons() ; for (int n = 0 ; n < awtButtonDownMasks.length ; ++n) { awtButtonDownMasks[n] = getAWTButtonDownMaskImpl(n+1); } @@ -153,7 +153,7 @@ public class AWTNewtEventFactory { case 2 : m = java.awt.event.InputEvent.BUTTON2_DOWN_MASK; break; // 1<<11 case 3 : m = java.awt.event.InputEvent.BUTTON3_DOWN_MASK; break; // 1<<12 default: - if( button <= com.jogamp.newt.event.MouseEvent.BUTTON_NUMBER ) { + if( button <= com.jogamp.newt.event.MouseEvent.BUTTON_COUNT ) { m = 1 << ( 10 + button ) ; // b4 = 1<<14, b5 = 1<<15, etc } else { m = 0; @@ -179,7 +179,7 @@ public class AWTNewtEventFactory { } public static final short awtButton2Newt(int awtButton) { - if( 0 < awtButton && awtButton <= com.jogamp.newt.event.MouseEvent.BUTTON_NUMBER ) { + if( 0 < awtButton && awtButton <= com.jogamp.newt.event.MouseEvent.BUTTON_COUNT ) { return (short)awtButton; } else { return (short)0; |