Fix sqare detection box for touch slopiness

This commit is contained in:
SerpentSpirale 2021-11-18 18:01:24 +01:00 committed by Boulay Mathias
parent a5d0c89be6
commit 3cb50a46ca

View File

@ -80,8 +80,7 @@ public class MinecraftGLView extends TextureView {
float x = CallbackBridge.mouseX;
float y = CallbackBridge.mouseY;
if (CallbackBridge.isGrabbing() &&
Math.abs(initialX - x) < FINGER_STILL_THRESHOLD &&
Math.abs(initialY - y) < FINGER_STILL_THRESHOLD) {
MathUtils.dist(x, y, mouse_x, mouse_y) < FINGER_STILL_THRESHOLD) {
triggeredLeftMouseButton = true;
sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_LEFT, true);
}