/** Returns true if this actor is a listener actor for touch focus. * @see Stage#addTouchFocus(EventListener, Actor, Actor, int, int) */ public boolean isTouchFocusListener () { Stage stage = getStage(); if (stage == null) return false; for (int i = 0, n = stage.touchFocuses.size; i < n; i++) if (stage.touchFocuses.get(i).listenerActor == this) return true; return false; }
/** Returns true if this actor is a target actor for touch focus. * @see Stage#addTouchFocus(EventListener, Actor, Actor, int, int) */ public boolean isTouchFocusTarget () { Stage stage = getStage(); if (stage == null) return false; for (int i = 0, n = stage.touchFocuses.size; i < n; i++) if (stage.touchFocuses.get(i).target == this) return true; return false; }
/** Returns true if this actor is a target actor for touch focus. * @see Stage#addTouchFocus(EventListener, Actor, Actor, int, int) */ public boolean isTouchFocusTarget () { Stage stage = getStage(); if (stage == null) return false; for (int i = 0, n = stage.touchFocuses.size; i < n; i++) if (stage.touchFocuses.get(i).target == this) return true; return false; }
/** Returns true if this actor is a listener actor for touch focus. * @see Stage#addTouchFocus(EventListener, Actor, Actor, int, int) */ public boolean isTouchFocusListener () { Stage stage = getStage(); if (stage == null) return false; for (int i = 0, n = stage.touchFocuses.size; i < n; i++) if (stage.touchFocuses.get(i).listenerActor == this) return true; return false; }
/** Disables debug on all actors recursively except the specified actor and any children. */ private void disableDebug (Actor actor, Actor except) { if (actor == except) return; actor.setDebug(false); if (actor instanceof Group) { SnapshotArray<Actor> children = ((Group)actor).children; for (int i = 0, n = children.size; i < n; i++) disableDebug(children.get(i), except); } }
/** Disables debug on all actors recursively except the specified actor and any children. */ private void disableDebug (Actor actor, Actor except) { if (actor == except) return; actor.setDebug(false); if (actor instanceof Group) { SnapshotArray<Actor> children = ((Group)actor).children; for (int i = 0, n = children.size; i < n; i++) disableDebug(children.get(i), except); } }
/** Removes touch focus for the specified listener, pointer, and button. Note the listener will not receive a touchUp event * when this method is used. */ public void removeTouchFocus (EventListener listener, Actor listenerActor, Actor target, int pointer, int button) { SnapshotArray<TouchFocus> touchFocuses = this.touchFocuses; for (int i = touchFocuses.size - 1; i >= 0; i--) { TouchFocus focus = touchFocuses.get(i); if (focus.listener == listener && focus.listenerActor == listenerActor && focus.target == target && focus.pointer == pointer && focus.button == button) { touchFocuses.removeIndex(i); Pools.free(focus); } } }
/** Removes touch focus for the specified listener, pointer, and button. Note the listener will not receive a touchUp event * when this method is used. */ public void removeTouchFocus (EventListener listener, Actor listenerActor, Actor target, int pointer, int button) { SnapshotArray<TouchFocus> touchFocuses = this.touchFocuses; for (int i = touchFocuses.size - 1; i >= 0; i--) { TouchFocus focus = touchFocuses.get(i); if (focus.listener == listener && focus.listenerActor == listenerActor && focus.target == target && focus.pointer == pointer && focus.button == button) { touchFocuses.removeIndex(i); Pools.free(focus); } } }
private void setLayoutEnabled (Group parent, boolean enabled) { SnapshotArray<Actor> children = parent.getChildren(); for (int i = 0, n = children.size; i < n; i++) { Actor actor = children.get(i); if (actor instanceof Layout) ((Layout)actor).setLayoutEnabled(enabled); else if (actor instanceof Group) // setLayoutEnabled((Group)actor, enabled); } }
private void setLayoutEnabled (Group parent, boolean enabled) { SnapshotArray<Actor> children = parent.getChildren(); for (int i = 0, n = children.size; i < n; i++) { Actor actor = children.get(i); if (actor instanceof Layout) ((Layout)actor).setLayoutEnabled(enabled); else if (actor instanceof Group) // setLayoutEnabled((Group)actor, enabled); } }
SnapshotArray<Actor> children = getChildren(); for (int i = 0, n = children.size; i < n; i++) { Actor child = children.get(i); float childMaxWidth, childMaxHeight; if (child instanceof Layout) {
SnapshotArray<Actor> children = getChildren(); for (int i = 0, n = children.size; i < n; i++) { Actor child = children.get(i); float childMaxWidth, childMaxHeight; if (child instanceof Layout) {
Actor child = children.get(i);
Actor child = children.get(i);
Actor child = children.get(i);
Actor child = children.get(i);
Actor child = children.get(i);
Actor child = children.get(i);
Actor child = children.get(i);