v2.0.2: fixed controller drag events incorrectly using separate IDs
This commit is contained in:
@@ -64,13 +64,13 @@ public class KeyEvent {
|
||||
public static synchronized void processKeyEvents(){
|
||||
for (KeyEvent k : keyEvents){
|
||||
if (KeyBindings.getActionForKey(k) == GameAction.LEFT_CLICK){
|
||||
Game.inputHandler.emulateTouch(PointerEvent.LEFT, k.pressed);
|
||||
Game.inputHandler.emulateTouch(ControllerHandler.CONTROLLER_POINTER_ID, PointerEvent.LEFT, k.pressed);
|
||||
if (KeyBindings.bindingKey) keySignal.dispatch(k);
|
||||
} else if (KeyBindings.getActionForKey(k) == GameAction.RIGHT_CLICK){
|
||||
Game.inputHandler.emulateTouch(PointerEvent.RIGHT, k.pressed);
|
||||
Game.inputHandler.emulateTouch(ControllerHandler.CONTROLLER_POINTER_ID, PointerEvent.RIGHT, k.pressed);
|
||||
if (KeyBindings.bindingKey) keySignal.dispatch(k);
|
||||
} else if (KeyBindings.getActionForKey(k) == GameAction.MIDDLE_CLICK){
|
||||
Game.inputHandler.emulateTouch(PointerEvent.MIDDLE, k.pressed);
|
||||
Game.inputHandler.emulateTouch(ControllerHandler.CONTROLLER_POINTER_ID, PointerEvent.MIDDLE, k.pressed);
|
||||
if (KeyBindings.bindingKey) keySignal.dispatch(k);
|
||||
} else {
|
||||
keySignal.dispatch(k);
|
||||
|
||||
Reference in New Issue
Block a user