mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-18 00:59:35 -04:00
Hotfix for mouse passthrough slight jump
This commit is contained in:
parent
bd22317639
commit
b9afe4f6b9
@ -348,7 +348,7 @@ public class BaseMainActivity extends LoggableActivity {
|
|||||||
|
|
||||||
switch (e.getActionMasked()) {
|
switch (e.getActionMasked()) {
|
||||||
case MotionEvent.ACTION_DOWN: // 0
|
case MotionEvent.ACTION_DOWN: // 0
|
||||||
shouldBeDown = true;
|
//shouldBeDown = true;
|
||||||
CallbackBridge.sendPrepareGrabInitialPos();
|
CallbackBridge.sendPrepareGrabInitialPos();
|
||||||
|
|
||||||
currentPointerID = e.getPointerId(0);
|
currentPointerID = e.getPointerId(0);
|
||||||
|
@ -262,6 +262,10 @@ public class ControlButton extends androidx.appcompat.widget.AppCompatButton imp
|
|||||||
case MotionEvent.ACTION_UP: // 1
|
case MotionEvent.ACTION_UP: // 1
|
||||||
case MotionEvent.ACTION_CANCEL: // 3
|
case MotionEvent.ACTION_CANCEL: // 3
|
||||||
case MotionEvent.ACTION_POINTER_UP: // 6
|
case MotionEvent.ACTION_POINTER_UP: // 6
|
||||||
|
if(mProperties.passThruEnabled){
|
||||||
|
MinecraftGLView v = ((ControlLayout) this.getParent()).findViewById(R.id.main_game_render_view);
|
||||||
|
if (v != null) v.dispatchTouchEvent(event);
|
||||||
|
}
|
||||||
if(isPointerOutOfBounds) ((ControlLayout) getParent()).onTouch(this, event);
|
if(isPointerOutOfBounds) ((ControlLayout) getParent()).onTouch(this, event);
|
||||||
isPointerOutOfBounds = false;
|
isPointerOutOfBounds = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user