Add a delay between held state on click
This commit is contained in:
1 parent
9aa7095ca1
commit
f404ddd2cb
1 file changed
+6
-4
@@ -804,10 +804,12 @@ CGPoint lastCenterPoint;
|
||||
if (currentHotbarSlot == -1) {
|
||||
inputTextLength = 0;
|
||||
|
||||
CallbackBridge_nativeSendMouseButton(
|
||||
isGrabbing == JNI_TRUE ? GLFW_MOUSE_BUTTON_RIGHT : GLFW_MOUSE_BUTTON_LEFT, 1, 0);
|
||||
CallbackBridge_nativeSendMouseButton(
|
||||
isGrabbing == JNI_TRUE ? GLFW_MOUSE_BUTTON_RIGHT : GLFW_MOUSE_BUTTON_LEFT, 0, 0);
|
||||
CallbackBridge_nativeSendMouseButton(isGrabbing == JNI_TRUE ?
|
||||
GLFW_MOUSE_BUTTON_RIGHT : GLFW_MOUSE_BUTTON_LEFT, 1, 0);
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 33 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{
|
||||
CallbackBridge_nativeSendMouseButton(isGrabbing == JNI_TRUE ?
|
||||
GLFW_MOUSE_BUTTON_RIGHT : GLFW_MOUSE_BUTTON_LEFT, 0, 0);
|
||||
});
|
||||
} else {
|
||||
CallbackBridge_nativeSendKey(currentHotbarSlot, 0, 1, 0);
|
||||
CallbackBridge_nativeSendKey(currentHotbarSlot, 0, 0, 0);
|
||||
|
||||
Reference in new issue
Block a user