Actors have a z-order equal to the order they were inserted into the group. Actors inserted later will be drawn on top of actors added earlier. Touch events that hit more than one actor are distributed to topmost actors first.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final SnapshotArray | |
| private final Matrix4 | |
| private Rectangle | |
| private final Matrix4 | |
| private static final Vector2 | |
| pack-priv boolean | |
| private final Affine2 |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | act(float delta)
Overrides com. Updates the actor based on time. |
| public void | |
| public void | addActorAfter(Actor actorAfter, Actor actor)
Adds an actor as a child of this group immediately after another child actor, removing it from its previous parent. |
| public void | addActorAt(int
May be greater than the number of children. index, Actor actor)Adds an actor as a child of this group at a specific index, removing it from its previous parent. |
| public void | addActorBefore(Actor actorBefore, Actor actor)
Adds an actor as a child of this group immediately before another child actor, removing it from its previous parent. |
| protected void | applyTransform(Batch batch, Matrix4 transform)
Set the batch's transformation matrix, often with the result of |
| protected void | applyTransform(ShapeRenderer shapes, Matrix4 transform)
Set the shape renderer transformation matrix, often with the result of |
| protected void | |
| public void | clear()
Overrides com. Removes all children, actions, and listeners from this group. |
| public void | |
| public void | |
| public void | |
| protected Matrix4 | |
| public Group | |
| public void | draw(Batch batch, float parentAlpha)
Overrides com. Draws the group and its children. |
| protected void | |
| public void | drawDebug(ShapeRenderer shapes)
Overrides com. Draws this actor's debug lines if |
| protected void | |
| public <T extends Actor> T | |
| public Actor | |
| public SnapshotArray | |
| public Rectangle | |
| public boolean | |
| public Actor | hit(float x, float y, boolean touchable)
Overrides com. Returns the deepest |
| public boolean | |
| public Vector2 | localToDescendantCoordinates(Actor descendant, Vector2 localCoords)
Converts coordinates for this group to those of a descendant actor. |
| public boolean | |
| public boolean | |
| public Actor | Returns: the actor removed from this group.If true, unfocus)Stage#unfocus(Actor) is called.Removes an actor from this group. |
| protected void | resetTransform(Batch batch)
Restores the batch transform to what it was before |
| protected void | resetTransform(ShapeRenderer shapes)
Restores the shape renderer transform to what it was before |
| public void | setCullingArea(Rectangle
May be null. cullingArea)Implements com. Children completely outside of this rectangle will not be drawn. |
| public void | setDebug(boolean enabled, boolean recursively)
If true, |
| protected void | setStage(Stage stage)
Overrides com. Called by the framework when this actor or any ascendant is added to a group that is in the stage. |
| public void | setTransform(boolean transform)
When true (the default), the Batch is transformed so children are drawn in their parent's coordinate system. |
| public boolean | |
| public boolean | |
| public String | toString()
Overrides com. Returns a description of the actor hierarchy, recursively. |
| pack-priv void |
| children | back to summary |
|---|---|
| pack-priv final SnapshotArray<Actor> children | |
| computedTransform | back to summary |
|---|---|
| private final Matrix4 computedTransform | |
| cullingArea | back to summary |
|---|---|
| private Rectangle cullingArea
| |
| oldTransform | back to summary |
|---|---|
| private final Matrix4 oldTransform | |
| tmp | back to summary |
|---|---|
| private static final Vector2 tmp | |
| transform | back to summary |
|---|---|
| pack-priv boolean transform | |
| worldTransform | back to summary |
|---|---|
| private final Affine2 worldTransform | |
| Group | back to summary |
|---|---|
| public Group() | |
| act | back to summary |
|---|---|
| public void act(float delta) Overrides com. Doc from com. Updates the actor based on time. Typically this is called each frame by
The default implementation calls | |
| addActor | back to summary |
|---|---|
| public void addActor(Actor actor) Adds an actor as a child of this group, removing it from its previous parent. If the actor is already a child of this group, no changes are made. | |
| addActorAfter | back to summary |
|---|---|
| public void addActorAfter(Actor actorAfter, Actor actor) Adds an actor as a child of this group immediately after another child actor, removing it from its previous parent. If the
actor is already a child of this group, no changes are made. If | |
| addActorAt | back to summary |
|---|---|
| public void addActorAt(int index, Actor actor) Adds an actor as a child of this group at a specific index, removing it from its previous parent. If the actor is already a child of this group, no changes are made.
| |
| addActorBefore | back to summary |
|---|---|
| public void addActorBefore(Actor actorBefore, Actor actor) Adds an actor as a child of this group immediately before another child actor, removing it from its previous parent. If the actor is already a child of this group, no changes are made. | |
| applyTransform | back to summary |
|---|---|
| protected void applyTransform(Batch batch, Matrix4 transform) Set the batch's transformation matrix, often with the result of | |
| applyTransform | back to summary |
|---|---|
| protected void applyTransform(ShapeRenderer shapes, Matrix4 transform) Set the shape renderer transformation matrix, often with the result of | |
| childrenChanged | back to summary |
|---|---|
| protected void childrenChanged() Called when actors are added to or removed from the group. | |
| clear | back to summary |
|---|---|
| public void clear() Overrides com. Removes all children, actions, and listeners from this group. The children are unfocused. | |
| clear | back to summary |
|---|---|
| public void clear(boolean unfocus) Removes all children, actions, and listeners from this group. | |
| clearChildren | back to summary |
|---|---|
| public void clearChildren() Removes all actors from this group and unfocuses them. Calls | |
| clearChildren | back to summary |
|---|---|
| public void clearChildren(boolean unfocus) Removes all actors from this group. | |
| computeTransform | back to summary |
|---|---|
| protected Matrix4 computeTransform() Returns the transform for this group's coordinate system. | |
| debugAll | back to summary |
|---|---|
| public Group debugAll() Calls | |
| draw | back to summary |
|---|---|
| public void draw(Batch batch, float parentAlpha) Overrides com. Draws the group and its children. The default implementation calls | |
| drawChildren | back to summary |
|---|---|
| protected void drawChildren(Batch batch, float parentAlpha) Draws all children. | |
| drawDebug | back to summary |
|---|---|
| public void drawDebug(ShapeRenderer shapes) Overrides com. Draws this actor's debug lines if | |
| drawDebugChildren | back to summary |
|---|---|
| protected void drawDebugChildren(ShapeRenderer shapes) Draws all children. | |
| findActor | back to summary |
|---|---|
| public <T extends Actor> T findActor(String name) Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the group.
| |
| getChild | back to summary |
|---|---|
| public Actor getChild(int index) Returns the child at the specified index. | |
| getChildren | back to summary |
|---|---|
| public SnapshotArray Returns an ordered list of child actors in this group. | |
| getCullingArea | back to summary |
|---|---|
public Rectangle getCullingArea()
| |
| hasChildren | back to summary |
|---|---|
| public boolean hasChildren() | |
| hit | back to summary |
|---|---|
| public Actor hit(float x, float y, boolean touchable) Overrides com. Doc from com. Returns the deepest This method is used to delegate touchDown, mouse, and enter/exit events. If this method returns null, those events will not occur on this Actor. The default implementation returns this actor if the point is within this actor's bounds and this actor is visible.
| |
| isTransform | back to summary |
|---|---|
| public boolean isTransform() | |
| localToDescendantCoordinates | back to summary |
|---|---|
| public Vector2 localToDescendantCoordinates(Actor descendant, Vector2 localCoords) Converts coordinates for this group to those of a descendant actor. The descendant does not need to be an immediate child.
| |
| removeActor | back to summary |
|---|---|
| public boolean removeActor(Actor actor) Removes an actor from this group and unfocuses it. Calls | |
| removeActor | back to summary |
|---|---|
| public boolean removeActor(Actor actor, boolean unfocus) Removes an actor from this group. Calls | |
| removeActorAt | back to summary |
|---|---|
| public Actor removeActorAt(int index, boolean unfocus) Removes an actor from this group. If the actor will not be used again and has actions, they should be
| |
| resetTransform | back to summary |
|---|---|
| protected void resetTransform(Batch batch) Restores the batch transform to what it was before | |
| resetTransform | back to summary |
|---|---|
| protected void resetTransform(ShapeRenderer shapes) Restores the shape renderer transform to what it was before | |
| setCullingArea | back to summary |
|---|---|
| public void setCullingArea(Rectangle cullingArea) Implements com. Children completely outside of this rectangle will not be drawn. This is only valid for use with unrotated and unscaled actors.
| |
| setDebug | back to summary |
|---|---|
| public void setDebug(boolean enabled, boolean recursively) If true, | |
| setStage | back to summary |
|---|---|
| protected void setStage(Stage stage) Overrides com. Doc from com. Called by the framework when this actor or any ascendant is added to a group that is in the stage. | |
| setTransform | back to summary |
|---|---|
| public void setTransform(boolean transform) When true (the default), the Batch is transformed so children are drawn in their parent's coordinate system. This has a
performance impact because | |
| swapActor | back to summary |
|---|---|
| public boolean swapActor(int first, int second) Swaps two actors by index. Returns false if the swap did not occur because the indexes were out of bounds. | |
| swapActor | back to summary |
|---|---|
| public boolean swapActor(Actor first, Actor second) Swaps two actors. Returns false if the swap did not occur because the actors are not children of this group. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Returns a description of the actor hierarchy, recursively. | |
| toString | back to summary |
|---|---|
| pack-priv void toString(StringBuilder buffer, int indent) | |