/** Removes the touch, keyboard, and scroll focus for the specified actor and any descendants. */ public void unfocus (Actor actor) { cancelTouchFocus(actor); if (scrollFocus != null && scrollFocus.isDescendantOf(actor)) setScrollFocus(null); if (keyboardFocus != null && keyboardFocus.isDescendantOf(actor)) setKeyboardFocus(null); }
/** Returns true if this actor is the {@link Stage#getKeyboardFocus() keyboard focus} actor. */ public boolean hasKeyboardFocus () { Stage stage = getStage(); return stage != null && stage.getKeyboardFocus() == this; }
/** Removes all children, actions, and listeners from this group. */ public void clear () { super.clear(); clearChildren(); }
public void setTarget (Actor newTarget) { if (target != null) target.removeListener(listener); super.setTarget(newTarget); if (newTarget != null) newTarget.addListener(listener); }
/** Returns true if this actor is the {@link Stage#getScrollFocus() scroll focus} actor. */ public boolean hasScrollFocus () { Stage stage = getStage(); return stage != null && stage.getScrollFocus() == this; }
/** Transforms the specified point in screen coordinates to the actor's local coordinate system. * @see Stage#screenToStageCoordinates(Vector2) */ public Vector2 screenToLocalCoordinates (Vector2 screenCoords) { Stage stage = this.stage; if (stage == null) return screenCoords; return stageToLocalCoordinates(stage.screenToStageCoordinates(screenCoords)); }
/** If true, {@link #drawDebug(ShapeRenderer)} will be called for this group and, optionally, all children recursively. */ public void setDebug (boolean enabled, boolean recursively) { setDebug(enabled); if (recursively) { for (Actor child : children) { if (child instanceof Group) { ((Group)child).setDebug(enabled, recursively); } else { child.setDebug(enabled); } } } }
/** Transforms the specified point in the actor's coordinates to be in screen coordinates. * @see Stage#stageToScreenCoordinates(Vector2) */ public Vector2 localToScreenCoordinates (Vector2 localCoords) { Stage stage = this.stage; if (stage == null) return localCoords; return stage.stageToScreenCoordinates(localToAscendantCoordinates(null, localCoords)); }
/** Removes the root's children, actions, and listeners. */ public void clear () { unfocusAll(); root.clear(); }
/** Transforms the specified point in the stage's coordinates to the actor's local coordinate system. */ public Vector2 stageToLocalCoordinates (Vector2 stageCoords) { if (parent != null) parent.stageToLocalCoordinates(stageCoords); parentToLocalCoordinates(stageCoords); return stageCoords; }
/** Removes the touch, keyboard, and scroll focus for the specified actor and any descendants. */ public void unfocus (Actor actor) { cancelTouchFocus(actor); if (scrollFocus != null && scrollFocus.isDescendantOf(actor)) setScrollFocus(null); if (keyboardFocus != null && keyboardFocus.isDescendantOf(actor)) setKeyboardFocus(null); }
public void setTarget (Actor newTarget) { if (target != null) target.removeListener(listener); super.setTarget(newTarget); if (newTarget != null) newTarget.addListener(listener); }
/** Returns true if this actor is the {@link Stage#getKeyboardFocus() keyboard focus} actor. */ public boolean hasKeyboardFocus () { Stage stage = getStage(); return stage != null && stage.getKeyboardFocus() == this; }
/** Returns true if this actor is the {@link Stage#getScrollFocus() scroll focus} actor. */ public boolean hasScrollFocus () { Stage stage = getStage(); return stage != null && stage.getScrollFocus() == this; }
/** Transforms the specified point in screen coordinates to the actor's local coordinate system. * @see Stage#screenToStageCoordinates(Vector2) */ public Vector2 screenToLocalCoordinates (Vector2 screenCoords) { Stage stage = this.stage; if (stage == null) return screenCoords; return stageToLocalCoordinates(stage.screenToStageCoordinates(screenCoords)); }
/** If true, {@link #drawDebug(ShapeRenderer)} will be called for this group and, optionally, all children recursively. */ public void setDebug (boolean enabled, boolean recursively) { setDebug(enabled); if (recursively) { for (Actor child : children) { if (child instanceof Group) { ((Group)child).setDebug(enabled, recursively); } else { child.setDebug(enabled); } } } }
/** Transforms the specified point in the actor's coordinates to be in screen coordinates. * @see Stage#stageToScreenCoordinates(Vector2) */ public Vector2 localToScreenCoordinates (Vector2 localCoords) { Stage stage = this.stage; if (stage == null) return localCoords; return stage.stageToScreenCoordinates(localToAscendantCoordinates(null, localCoords)); }
/** Removes the root's children, actions, and listeners. */ public void clear () { unfocusAll(); root.clear(); }
/** Removes all children, actions, and listeners from this group. */ public void clear () { super.clear(); clearChildren(); }
/** Transforms the specified point in the stage's coordinates to the actor's local coordinate system. */ public Vector2 stageToLocalCoordinates (Vector2 stageCoords) { if (parent != null) parent.stageToLocalCoordinates(stageCoords); parentToLocalCoordinates(stageCoords); return stageCoords; }