Beispiel #1
0
 /**
  * Adds an actor as a child of this group, at a specific index. The actor is first removed from
  * its parent group, if any.
  */
 public void addActorAt(int index, Actor actor) {
   actor.remove();
   children.insert(index, actor);
   actor.setParent(this);
   actor.setStage(getStage());
   childrenChanged();
 }
Beispiel #2
0
 /**
  * Adds an actor as a child of this group, immediately before another child actor. The actor is
  * first removed from its parent group, if any.
  */
 public void addActorBefore(Actor actorBefore, Actor actor) {
   actor.remove();
   int index = children.indexOf(actorBefore, true);
   children.insert(index, actor);
   actor.setParent(this);
   actor.setStage(getStage());
   childrenChanged();
 }
Beispiel #3
0
 /**
  * Adds an actor as a child of this group, immediately after another child actor. The actor is
  * first removed from its parent group, if any.
  */
 public void addActorAfter(Actor actorAfter, Actor actor) {
   actor.remove();
   int index = children.indexOf(actorAfter, true);
   if (index == children.size) children.add(actor);
   else children.insert(index + 1, actor);
   actor.setParent(this);
   actor.setStage(getStage());
   childrenChanged();
 }