mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 13:30:15 -07:00
Back to grab check
This commit is contained in:
parent
1645902524
commit
41e6935914
1 changed files with 25 additions and 21 deletions
|
|
@ -433,11 +433,13 @@ public class MainActivity extends LoggableActivity implements OnTouchListener, O
|
||||||
CallbackBridge.mouseLeft = true;
|
CallbackBridge.mouseLeft = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CallbackBridge.isGrabbing()) {
|
||||||
// CallbackBridge.putMouseEventWithCoords(rightOverride ? (byte) 1 : (byte) 0, (byte) 1, x, y, 0, System.nanoTime());
|
// CallbackBridge.putMouseEventWithCoords(rightOverride ? (byte) 1 : (byte) 0, (byte) 1, x, y, 0, System.nanoTime());
|
||||||
initialX = x;
|
initialX = x;
|
||||||
initialY = y;
|
initialY = y;
|
||||||
theHandler.sendEmptyMessageDelayed(MainActivity.MSG_LEFT_MOUSE_BUTTON_CHECK, LauncherPreferences.PREF_LONGPRESS_TRIGGER);
|
theHandler.sendEmptyMessageDelayed(MainActivity.MSG_LEFT_MOUSE_BUTTON_CHECK, LauncherPreferences.PREF_LONGPRESS_TRIGGER);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MotionEvent.ACTION_UP: // 1
|
case MotionEvent.ACTION_UP: // 1
|
||||||
case MotionEvent.ACTION_CANCEL: // 3
|
case MotionEvent.ACTION_CANCEL: // 3
|
||||||
|
|
@ -453,6 +455,7 @@ public class MainActivity extends LoggableActivity implements OnTouchListener, O
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CallbackBridge.isGrabbing()) {
|
||||||
// System.out.println((String) ("[Math.abs(" + initialX + " - " + x + ") = " + Math.abs(initialX - x) + "] < " + fingerStillThreshold));
|
// System.out.println((String) ("[Math.abs(" + initialX + " - " + x + ") = " + Math.abs(initialX - x) + "] < " + fingerStillThreshold));
|
||||||
// System.out.println((String) ("[Math.abs(" + initialY + " - " + y + ") = " + Math.abs(initialY - y) + "] < " + fingerStillThreshold));
|
// System.out.println((String) ("[Math.abs(" + initialY + " - " + y + ") = " + Math.abs(initialY - y) + "] < " + fingerStillThreshold));
|
||||||
if (isTouchInHotbar && Math.abs(hotbarX - x) < fingerStillThreshold && Math.abs(hotbarY - y) < fingerStillThreshold) {
|
if (isTouchInHotbar && Math.abs(hotbarX - x) < fingerStillThreshold && Math.abs(hotbarY - y) < fingerStillThreshold) {
|
||||||
|
|
@ -471,6 +474,7 @@ public class MainActivity extends LoggableActivity implements OnTouchListener, O
|
||||||
sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_Q, 0, false);
|
sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_Q, 0, false);
|
||||||
theHandler.removeMessages(MSG_DROP_ITEM_BUTTON_CHECK);
|
theHandler.removeMessages(MSG_DROP_ITEM_BUTTON_CHECK);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue