Package com.badlogic.gdx.scenes.scene2d

Examples of com.badlogic.gdx.scenes.scene2d.Group


  }

  /** Invalidates this widget and all its parents, causing all involved widgets to relayout themselves at the next oportunity. */
  public void invalidateHierarchy () {
    invalidate();
    Group parent = this.parent;
    while (parent != null) {
      if (parent instanceof Layout) ((Layout)parent).invalidate();
      parent = parent.parent;
    }
  }
View Full Code Here


    if (object instanceof String) {
      if (defaultFont == null) throw new IllegalStateException("No default font has been set.");
      return new Label(null, defaultFont, (String)object);
    }
    if (object == null) {
      Group group = new Group();
      group.transform = false;
      return group;
    }
    return super.wrap(object);
  }
View Full Code Here

        m_map = null;

        m_font = new BitmapFont();

        m_entityGroup = new Group("EntityGroup");
        m_menuGroup = new Group("MenuGroup");

        m_stage.addActor(m_entityGroup);
        //m_stage.addActor(m_menuGroup);

        //Keyboard
View Full Code Here

   * @return Target class or null if not found.
   */
  @SuppressWarnings("rawtypes")
  public static Actor hit(float x, float y, Stage stage, Class targetClass)
  {
    Group root = stage.getRoot();

    SnapshotArray<Actor> children = root.getChildren();

    Actor hit = null;
    boolean found = false;
    int index = children.size - 1;
    while (!found && index >= 0)
    {
      Actor child = children.get(index);

      point.x = x;
      point.y = y;

      root.localToDescendantCoordinates(child, point);

      Actor childHit = root.hit(point.x, point.y, true);

      if (childHit != null && childHit.getClass().isAssignableFrom(targetClass))
      {
        found = true;
        hit = childHit;
View Full Code Here

  }

  public void validate () {
    if (!layoutEnabled) return;

    Group parent = getParent();
    if (fillParent && parent != null) {
      float parentWidth, parentHeight;
      Stage stage = getStage();
      if (stage != null && parent == stage.getRoot()) {
        parentWidth = stage.getWidth();
        parentHeight = stage.getHeight();
      } else {
        parentWidth = parent.getWidth();
        parentHeight = parent.getHeight();
      }
      setSize(parentWidth, parentHeight);
    }

    if (!needsLayout) return;
View Full Code Here

  }

  public void invalidateHierarchy () {
    if (!layoutEnabled) return;
    invalidate();
    Group parent = getParent();
    if (parent instanceof Layout) ((Layout)parent).invalidateHierarchy();
  }
View Full Code Here

    }
  }

  public void validate () {
    if (!layoutEnabled) return;
    Group parent = getParent();
    if (fillParent && parent != null) {
      Stage stage = getStage();

      float parentWidth, parentHeight;
      if (stage != null && parent == stage.getRoot()) {
        parentWidth = stage.getWidth();
        parentHeight = stage.getHeight();
      } else {
        parentWidth = parent.getWidth();
        parentHeight = parent.getHeight();
      }
      if (getWidth() != parentWidth || getHeight() != parentHeight) {
        setWidth(parentWidth);
        setHeight(parentHeight);
        invalidate();
View Full Code Here

    needsLayout = true;
  }

  public void invalidateHierarchy () {
    invalidate();
    Group parent = getParent();
    if (parent instanceof Layout) ((Layout)parent).invalidateHierarchy();
  }
View Full Code Here

      children.clear();
    }

    /** Returns the tree this node is currently in, or null. */
    public Tree getTree () {
      Group parent = actor.getParent();
      if (!(parent instanceof Tree)) return null;
      return (Tree)parent;
    }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.scenes.scene2d.Group

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.