@@ -483,6 +483,9 @@ static boolean handleMouseEvent(final MotionEvent event) {
483
483
final int eventAction = event .getActionMasked ();
484
484
final float x = event .getX ();
485
485
final float y = event .getY ();
486
+ final float pressure = event .getPressure ();
487
+ final float tiltX = event .getTiltX ();
488
+ final float tiltY = event .getTiltY ();
486
489
final int buttonsMask = event .getButtonState ();
487
490
488
491
float verticalFactor = 0 ;
@@ -505,18 +508,27 @@ static boolean handleMouseEvent(final MotionEvent event) {
505
508
if (android .os .Build .VERSION .SDK_INT >= android .os .Build .VERSION_CODES .O ) {
506
509
sourceMouseRelative = event .isFromSource (InputDevice .SOURCE_MOUSE_RELATIVE );
507
510
}
508
- return handleMouseEvent (eventAction , buttonsMask , x , y , horizontalFactor , verticalFactor , false , sourceMouseRelative );
511
+
512
+ Log .d ("GodotInputHandler" , "handleMouseEvent " + horizontalFactor + " " + verticalFactor + " ACTION " + eventAction + " buttonMask " + buttonsMask , pressure , tiltX , tiltY );
513
+ return handleMouseEvent (eventAction , buttonsMask , x , y , horizontalFactor , verticalFactor , false , sourceMouseRelative , pressure , tiltX , tiltY );
514
+ }
515
+ static boolean handleMouseEvent (int eventAction , int buttonsMask , float x , float y , float deltaX , float deltaY , boolean doubleClick , boolean sourceMouseRelative ) {
516
+ return handleMouseEvent (eventAction , buttonsMask , x , y , deltaX , deltaY , doubleClick , sourceMouseRelative , 1 , 0 , 0 );
509
517
}
510
518
511
- static boolean handleMouseEvent (int eventAction , int buttonsMask , float x , float y ) {
512
- return handleMouseEvent (eventAction , buttonsMask , x , y , 0 , 0 , false , false );
519
+ static boolean handleMouseEvent (int eventAction , int buttonsMask , float x , float y , float deltaX , float deltaY , boolean doubleClick ) {
520
+ return handleMouseEvent (eventAction , buttonsMask , x , y , deltaX , deltaY , doubleClick , false , 1 , 0 , 0 );
513
521
}
514
522
515
- static boolean handleMouseEvent (int eventAction , int buttonsMask , float x , float y , boolean doubleClick ) {
516
- return handleMouseEvent (eventAction , buttonsMask , x , y , 0 , 0 , doubleClick , false );
523
+ static boolean handleMouseEvent (int eventAction , int buttonsMask , float x , float y , float deltaX , float deltaY ) {
524
+ return handleMouseEvent (eventAction , buttonsMask , x , y , deltaX , deltaY , false , false , 1 , 0 , 0 );
517
525
}
518
526
519
- static boolean handleMouseEvent (int eventAction , int buttonsMask , float x , float y , float deltaX , float deltaY , boolean doubleClick , boolean sourceMouseRelative ) {
527
+ static boolean handleMouseEvent (int eventAction , int buttonsMask , float x , float y ) {
528
+ return handleMouseEvent (eventAction , buttonsMask , x , y , 0 , 0 );
529
+ }
530
+
531
+ static boolean handleMouseEvent (int eventAction , int buttonsMask , float x , float y , float deltaX , float deltaY , boolean doubleClick , boolean sourceMouseRelative , float pressure , float tiltX , float tiltY ) {
520
532
// Fix the buttonsMask
521
533
switch (eventAction ) {
522
534
case MotionEvent .ACTION_CANCEL :
@@ -544,7 +556,7 @@ static boolean handleMouseEvent(int eventAction, int buttonsMask, float x, float
544
556
case MotionEvent .ACTION_HOVER_MOVE :
545
557
case MotionEvent .ACTION_MOVE :
546
558
case MotionEvent .ACTION_SCROLL : {
547
- GodotLib .dispatchMouseEvent (eventAction , buttonsMask , x , y , deltaX , deltaY , doubleClick , sourceMouseRelative );
559
+ GodotLib .dispatchMouseEvent (eventAction , buttonsMask , x , y , deltaX , deltaY , doubleClick , sourceMouseRelative , pressure , tiltX , tiltY );
548
560
return true ;
549
561
}
550
562
}
0 commit comments