The drop hotbar item is now excluded from gestures

This commit is contained in:
SerpentSpirale 2021-08-14 22:18:38 +02:00
parent 0d45a4e170
commit c939b5dcc7

View File

@ -59,9 +59,9 @@ public class BaseMainActivity extends LoggableActivity {
private static boolean triggeredLeftMouseButton = false; private static boolean triggeredLeftMouseButton = false;
private final Handler theHandler = new Handler() { private final Handler theHandler = new Handler() {
public void handleMessage(Message msg) { public void handleMessage(Message msg) {
if (!LauncherPreferences.PREF_DISABLE_GESTURES) {
switch (msg.what) { switch (msg.what) {
case MSG_LEFT_MOUSE_BUTTON_CHECK: { case MSG_LEFT_MOUSE_BUTTON_CHECK:
if(LauncherPreferences.PREF_DISABLE_GESTURES) break;
int x = CallbackBridge.mouseX; int x = CallbackBridge.mouseX;
int y = CallbackBridge.mouseY; int y = CallbackBridge.mouseY;
if (CallbackBridge.isGrabbing() && if (CallbackBridge.isGrabbing() &&
@ -70,11 +70,11 @@ public class BaseMainActivity extends LoggableActivity {
triggeredLeftMouseButton = true; triggeredLeftMouseButton = true;
sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_LEFT, true); sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_LEFT, true);
} }
} break; break;
case MSG_DROP_ITEM_BUTTON_CHECK: { case MSG_DROP_ITEM_BUTTON_CHECK:
sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_Q, 0, true); sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_Q, 0, true);
} break; break;
}
} }
} }
}; };