本文整理了Java中com.badlogic.gdx.scenes.scene2d.Group.removeActor()
方法的一些代码示例,展示了Group.removeActor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Group.removeActor()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.Group
类名称:Group
方法名:removeActor
[英]Removes an actor from this group and unfocuses it. Calls #removeActor(Actor,boolean) with true.
[中]
代码示例来源:origin: libgdx/libgdx
/** 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;
}
代码示例来源:origin: libgdx/libgdx
/** 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;
}
代码示例来源:origin: libgdx/libgdx
/** 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);
}
代码示例来源:origin: libgdx/libgdx
/** 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);
}
代码示例来源:origin: libgdx/libgdx
/** 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);
}
代码示例来源:origin: libgdx/libgdx
/** 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);
}
代码示例来源:origin: libgdx/libgdx
/** 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();
}
代码示例来源:origin: libgdx/libgdx
/** 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();
}
代码示例来源:origin: libgdx/libgdx
/** 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();
}
代码示例来源:origin: libgdx/libgdx
/** 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();
}
代码示例来源:origin: libgdx/libgdx
/** 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();
}
代码示例来源:origin: libgdx/libgdx
/** 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();
}
代码示例来源:origin: libgdx/libgdx
/** 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();
}
代码示例来源:origin: libgdx/libgdx
/** 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();
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** 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;
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** 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);
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** 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();
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
/** 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();
}
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
@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);
}
}
});
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
@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);
}
}
});
内容来源于网络,如有侵权,请联系作者删除!