/** Removes this actor from its parent, if it has a parent. * @see Group#removeActor(Actor) */ public boolean remove () { if (parent != null) return parent.removeActor(this, true); return false; }
/** Removes this actor from its parent, if it has a parent. * @see Group#removeActor(Actor) */ public boolean remove () { if (parent != null) return parent.removeActor(this, true); return false; }
/** Removes an actor from this group and unfocuses it. Calls {@link #removeActor(Actor, boolean)} with true. */ public boolean removeActor (Actor actor) { return removeActor(actor, true); }
/** Removes an actor from this group and unfocuses it. Calls {@link #removeActor(Actor, boolean)} with true. */ public boolean removeActor (Actor actor) { return removeActor(actor, true); }
/** Replaces the root group. This can be useful, for example, to subclass the root group to be notified by * {@link Group#childrenChanged()}. */ public void setRoot (Group root) { if (root.parent != null) root.parent.removeActor(root, false); this.root = root; root.setParent(null); root.setStage(this); }
/** Replaces the root group. This can be useful, for example, to subclass the root group to be notified by * {@link Group#childrenChanged()}. */ public void setRoot (Group root) { if (root.parent != null) root.parent.removeActor(root, false); this.root = root; root.setParent(null); root.setStage(this); }
/** 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. */ public void addActor (Actor actor) { if (actor.parent != null) { if (actor.parent == this) return; actor.parent.removeActor(actor, false); } children.add(actor); actor.setParent(this); actor.setStage(getStage()); childrenChanged(); }
/** 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. */ public void addActor (Actor actor) { if (actor.parent != null) { if (actor.parent == this) return; actor.parent.removeActor(actor, false); } children.add(actor); actor.setParent(this); actor.setStage(getStage()); childrenChanged(); }
/** 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. */ public void addActorBefore (Actor actorBefore, Actor actor) { if (actor.parent != null) { if (actor.parent == this) return; actor.parent.removeActor(actor, false); } int index = children.indexOf(actorBefore, true); children.insert(index, actor); actor.setParent(this); actor.setStage(getStage()); childrenChanged(); }
/** 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. */ public void addActorBefore (Actor actorBefore, Actor actor) { if (actor.parent != null) { if (actor.parent == this) return; actor.parent.removeActor(actor, false); } int index = children.indexOf(actorBefore, true); children.insert(index, actor); actor.setParent(this); actor.setStage(getStage()); childrenChanged(); }
/** 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. * @param index May be greater than the number of children. */ public void addActorAt (int index, Actor actor) { if (actor.parent != null) { if (actor.parent == this) return; actor.parent.removeActor(actor, false); } if (index >= children.size) children.add(actor); else children.insert(index, actor); actor.setParent(this); actor.setStage(getStage()); childrenChanged(); }
/** 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. * @param index May be greater than the number of children. */ public void addActorAt (int index, Actor actor) { if (actor.parent != null) { if (actor.parent == this) return; actor.parent.removeActor(actor, false); } if (index >= children.size) children.add(actor); else children.insert(index, actor); actor.setParent(this); actor.setStage(getStage()); childrenChanged(); }
/** 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. */ public void addActorAfter (Actor actorAfter, Actor actor) { if (actor.parent != null) { if (actor.parent == this) return; actor.parent.removeActor(actor, false); } 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(); }
/** 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. */ public void addActorAfter (Actor actorAfter, Actor actor) { if (actor.parent != null) { if (actor.parent == this) return; actor.parent.removeActor(actor, false); } 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(); }
/** Removes this actor from its parent, if it has a parent. * @see Group#removeActor(Actor) */ public boolean remove () { if (parent != null) return parent.removeActor(this, true); return false; }
/** Removes an actor from this group and unfocuses it. Calls {@link #removeActor(Actor, boolean)} with true. */ public boolean removeActor (Actor actor) { return removeActor(actor, true); }
/** 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. */ public void addActor (Actor actor) { if (actor.parent != null) { if (actor.parent == this) return; actor.parent.removeActor(actor, false); } children.add(actor); actor.setParent(this); actor.setStage(getStage()); childrenChanged(); }
/** 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. */ public void addActorBefore (Actor actorBefore, Actor actor) { if (actor.parent != null) { if (actor.parent == this) return; actor.parent.removeActor(actor, false); } int index = children.indexOf(actorBefore, true); children.insert(index, actor); actor.setParent(this); actor.setStage(getStage()); childrenChanged(); }
@Override public void changed(ChangeEvent event, com.badlogic.gdx.scenes.scene2d.Actor actor) { if (toolsButton.isChecked()) { scnWidget.getParent().addActor(toolsWindow); toolsWindow.setPosition(getScnWidget().getX() + 5, getScnWidget().getY() + 5); toolsWindow.invalidate(); } else { scnWidget.getParent().removeActor(toolsWindow); } } });
@Override public void changed(ChangeEvent event, com.badlogic.gdx.scenes.scene2d.Actor actor) { if (viewButton.isChecked()) { scnWidget.getParent().addActor(viewWindow); viewWindow.setPosition(getScnWidget().getX() + 5, getScnWidget().getY() + 5); viewWindow.invalidate(); } else { scnWidget.getParent().removeActor(viewWindow); } } });