Skip to content

Commit

Permalink
Fixed ActorGestureListener long press.
Browse files Browse the repository at this point in the history
Keep the actor until touch up.
  • Loading branch information
NathanSweet committed Apr 28, 2024
1 parent 0ae653c commit a523316
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -114,11 +114,11 @@ public boolean handle (Event e) {
touchDown(event, tmpCoords.x, tmpCoords.y, event.getPointer(), event.getButton());
if (event.getTouchFocus()) event.getStage().addTouchFocus(this, event.getListenerActor(), event.getTarget(),
event.getPointer(), event.getButton());
actor = null;
return true;
case touchUp:
if (event.isTouchFocusCancel()) {
detector.reset();
actor = null;
touchDownTarget = null;
return false;
}
Expand All @@ -134,7 +134,6 @@ public boolean handle (Event e) {
this.event = event;
actor = event.getListenerActor();
detector.touchDragged(event.getStageX(), event.getStageY(), event.getPointer());
actor = null;
return true;
}
return false;
Expand Down

0 comments on commit a523316

Please sign in to comment.