예제 #1
0
파일: Group.java 프로젝트: btdiehr/libgdx
 /**
  * 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();
 }
예제 #2
0
파일: Group.java 프로젝트: btdiehr/libgdx
 /**
  * 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();
 }
예제 #3
0
파일: Group.java 프로젝트: btdiehr/libgdx
 /**
  * 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();
 }