v2.0.2: fixed controller drag events incorrectly using separate IDs
This commit is contained in:
@@ -79,18 +79,18 @@ public class InputHandler extends InputAdapter {
|
||||
multiplexer.removeProcessor(processor);
|
||||
}
|
||||
|
||||
public void emulateTouch(int button, boolean down){
|
||||
public void emulateTouch(int id, int button, boolean down){
|
||||
PointF hoverPos = PointerEvent.currentHoverPos();
|
||||
if (down){
|
||||
multiplexer.touchDown((int)hoverPos.x, (int)hoverPos.y, 10+button, button);
|
||||
multiplexer.touchDown((int)hoverPos.x, (int)hoverPos.y, id, button);
|
||||
} else {
|
||||
multiplexer.touchUp((int)hoverPos.x, (int)hoverPos.y, 10+button, button);
|
||||
multiplexer.touchUp((int)hoverPos.x, (int)hoverPos.y, id, button);
|
||||
}
|
||||
}
|
||||
|
||||
public void emulateDrag(int button){
|
||||
public void emulateDrag(int id){
|
||||
PointF hoverPos = PointerEvent.currentHoverPos();
|
||||
multiplexer.touchDragged((int)hoverPos.x, (int)hoverPos.y, 10+button);
|
||||
multiplexer.touchDragged((int)hoverPos.x, (int)hoverPos.y, id);
|
||||
}
|
||||
|
||||
public void processAllEvents(){
|
||||
@@ -105,7 +105,7 @@ public class InputHandler extends InputAdapter {
|
||||
|
||||
@Override
|
||||
public synchronized boolean touchDown(int screenX, int screenY, int pointer, int button) {
|
||||
if (pointer < 10) {
|
||||
if (pointer != ControllerHandler.CONTROLLER_POINTER_ID) {
|
||||
ControllerHandler.setControllerPointer(false);
|
||||
ControllerHandler.controllerActive = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user