/** Transforms the specified point in the stage's coordinates to the actor's local coordinate system. */ public Vector2 stageToLocalCoordinates (Vector2 stageCoords) { if (parent != null) parent.stageToLocalCoordinates(stageCoords); parentToLocalCoordinates(stageCoords); return stageCoords; }
/** Transforms the specified point in the stage's coordinates to the actor's local coordinate system. */ public Vector2 stageToLocalCoordinates (Vector2 stageCoords) { if (parent != null) parent.stageToLocalCoordinates(stageCoords); parentToLocalCoordinates(stageCoords); return stageCoords; }
/** Transforms the specified point in the stage's coordinates to the actor's local coordinate system. */ public Vector2 stageToLocalCoordinates (Vector2 stageCoords) { if (parent != null) parent.stageToLocalCoordinates(stageCoords); parentToLocalCoordinates(stageCoords); return stageCoords; }
/** Adds the given Actor to the given Group at the coordinates relative to the Stage. * @param actor the Actor to add to the given Group * @param newParent the Group to add the given Actor to */ public static void addAtStageCoordinates(Actor actor, Group newParent) { tmp.set(positionInStageCoordinates(actor)); newParent.stageToLocalCoordinates(tmp); newParent.addActor(actor); actor.setPosition(tmp.x, tmp.y); }