public boolean act (float delta) { if (!removed) { removed = true; target.remove(); } return true; }
public boolean act (float delta) { if (!removed) { removed = true; target.remove(); } return true; }
/** Sets the actor in this cell and adds the actor to the cell's table. If null, removes any current actor. */ public <A extends Actor> Cell<A> setActor (A newActor) { if (actor != newActor) { if (actor != null && actor.getParent() == table) actor.remove(); actor = newActor; if (newActor != null) table.addActor(newActor); } return (Cell<A>)this; }
/** Sets the actor in this cell and adds the actor to the cell's table. If null, removes any current actor. */ public <A extends Actor> Cell<A> setActor (A newActor) { if (actor != newActor) { if (actor != null && actor.getParent() == table) actor.remove(); actor = newActor; if (newActor != null) table.addActor(newActor); } return (Cell<A>)this; }
/** Removes all actors and cells from the table. */ public void clearChildren () { Array<Cell> cells = this.cells; for (int i = cells.size - 1; i >= 0; i--) { Cell cell = cells.get(i); Actor actor = cell.actor; if (actor != null) actor.remove(); } cellPool.freeAll(cells); cells.clear(); rows = 0; columns = 0; if (rowDefaults != null) cellPool.free(rowDefaults); rowDefaults = null; implicitEndRow = false; super.clearChildren(); }
/** Removes all actors and cells from the table. */ public void clearChildren () { Array<Cell> cells = this.cells; for (int i = cells.size - 1; i >= 0; i--) { Cell cell = cells.get(i); Actor actor = cell.actor; if (actor != null) actor.remove(); } cellPool.freeAll(cells); cells.clear(); rows = 0; columns = 0; if (rowDefaults != null) cellPool.free(rowDefaults); rowDefaults = null; implicitEndRow = false; super.clearChildren(); }
public void dragStop (InputEvent event, float x, float y, int pointer) { if (pointer != activePointer) return; activePointer = -1; if (payload == null) return; if (System.currentTimeMillis() - dragStartTime < dragTime) isValidTarget = false; if (dragActor != null) dragActor.remove(); if (isValidTarget) { float stageX = event.getStageX() + touchOffsetX, stageY = event.getStageY() + touchOffsetY; target.actor.stageToLocalCoordinates(tmpVector.set(stageX, stageY)); target.drop(source, payload, tmpVector.x, tmpVector.y, pointer); } source.dragStop(event, x, y, pointer, payload, isValidTarget ? target : null); if (target != null) target.reset(source, payload); dragSource = null; payload = null; target = null; isValidTarget = false; dragActor = null; } };
public void dragStop (InputEvent event, float x, float y, int pointer) { if (pointer != activePointer) return; activePointer = -1; if (payload == null) return; if (System.currentTimeMillis() - dragStartTime < dragTime) isValidTarget = false; if (dragActor != null) dragActor.remove(); if (isValidTarget) { float stageX = event.getStageX() + touchOffsetX, stageY = event.getStageY() + touchOffsetY; target.actor.stageToLocalCoordinates(tmpVector.set(stageX, stageY)); target.drop(source, payload, tmpVector.x, tmpVector.y, pointer); } source.dragStop(event, x, y, pointer, payload, isValidTarget ? target : null); if (target != null) target.reset(source, payload); dragSource = null; payload = null; target = null; isValidTarget = false; dragActor = null; } };
dragActor.remove(); // Remove so it cannot be hit (Touchable.disabled isn't enough). dragActor = null;
dragActor.remove(); // Remove so it cannot be hit (Touchable.disabled isn't enough). dragActor = null;
for(Actor actor : stage.getActors()) { Vector3 windowCoordinates = new Vector3(actor.getX(), actor.getY(), 0); camera.project(windowCoordinates); if(windowCoordinates.x + actor.getWidth() < 0) actor.remove(); }
@Override public boolean remove () { actor = null; return super.remove(); }
/** Removes mock-up blocker actor from the stage. */ protected static void removeBlocker () { BLOCKER.remove(); }
public boolean act (float delta) { if (!removed) { removed = true; target.remove(); } return true; }
SnapshotArray<Actor> actors = new SnapshotArray<Actor>(stage.getActors()); for(Actor actor : actors) { actor.remove(); }
//Create an actor and add it to the Stage: Actor myActor = new Actor(); stage.addActor(myActor); //Then remove the actor: myActor.remove();
public GdxQuery removeAll(){ for(Actor actor:list()) actor.remove(); return this; }
public void setDialogUI(Actor a) { dialogUI.remove(); dialogUI = a; stage.addActor(dialogUI); }
/** Sets the actor in this cell and adds the actor to the cell's table. If null, removes any current actor. */ public <A extends Actor> Cell<A> setActor (A newActor) { if (actor != newActor) { if (actor != null && actor.getParent() == table) actor.remove(); actor = newActor; if (newActor != null) table.addActor(newActor); } return (Cell<A>)this; }
public void setTextManagerUI(Actor a) { if (a instanceof ITextManagerUI) { textManagerUI.remove(); textManagerUI = a; stage.addActor(textManagerUI); } else { EngineLogger.error("ERROR setTextManagerUI: actor is not a ITextManagerUI"); dispose(); Gdx.app.exit(); } }