Example #1
0
  private void invalidateChildren(WidgetGroup group) {
    SnapshotArray<Actor> children = group.getChildren();

    Actor actor;
    for (int i = 0; i < children.size; i++) {
      actor = children.get(i);
      if (actor instanceof Layout) {
        // UIWidgets are the best! :D
        ((Layout) actor).invalidate();
      }

      if (actor instanceof WidgetGroup) {
        // If it's a group, recurse
        invalidateChildren((WidgetGroup) actor);
      }
    }

    group.invalidate();
  }