Try to fix: Mouse right button, Hotbar selection

This commit is contained in:
khanhduytran0
2020-10-07 05:17:20 +07:00
parent cfaef99811
commit 5d5be52a11
2 changed files with 34 additions and 23 deletions

View File

@@ -170,8 +170,8 @@ public class AndroidLWJGLKeycode {
for (Map.Entry<Integer, Integer> perKey : androidToLwjglMap.entrySet()) {
if (i == 1 && (keyEvent.getSource() == InputDevice.SOURCE_MOUSE)) {
// Right mouse detection
mainActivity.sendMouseButton(1, true);
mainActivity.sendMouseButton(1, false);
mainActivity.sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, true);
mainActivity.sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, false);
} else if (perKey.getKey() == i) {
mainActivity.sendKeyPress(perKey.getValue(), keyEvent.getModifiers(), isDown);
}