Possible fix for broken touch hover

This commit is contained in:
Duy Tran Khanh 2021-10-12 08:28:52 +07:00 committed by GitHub
parent 4152a0011e
commit 96202b9d05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -444,6 +444,8 @@ public class BaseMainActivity extends LoggableActivity {
CallbackBridge.sendScroll(Tools.pxToDp(mouse_x - scrollInitialX)/30 , Tools.pxToDp(mouse_y - scrollInitialY)/30);
scrollInitialX = (int)mouse_x;
scrollInitialY = (int)mouse_y;
} else if (!CallbackBridge.isGrabbing() && e.getPointerCount() == 1) { //Touch hover
CallbackBridge.sendCursorPos(e.getX(), e.getY());
} else if (!isTouchInHotbar) {
//Camera movement
if(CallbackBridge.isGrabbing()){