Package com.badlogic.gdx.graphics

Examples of com.badlogic.gdx.graphics.Color


    }
    return y;
  }

  public void draw (SpriteBatch batch, float parentAlpha) {
    Color color = getColor();
    if (style.background != null) {
      batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
      style.background.draw(batch, getX(), getY(), getWidth(), getHeight());
      batch.setColor(Color.WHITE);
    }
View Full Code Here


      image.setDrawable(style.imageUp);
  }

  public void draw (SpriteBatch batch, float parentAlpha) {
    updateImage();
    Color fontColor;
    if (isDisabled && style.disabledFontColor != null)
      fontColor = style.disabledFontColor;
    else if (isPressed() && style.downFontColor != null)
      fontColor = style.downFontColor;
    else if (isChecked && style.checkedFontColor != null)
View Full Code Here

  public TextButtonStyle getStyle () {
    return style;
  }

  public void draw (SpriteBatch batch, float parentAlpha) {
    Color fontColor;
    if (isDisabled && style.disabledFontColor != null)
      fontColor = style.disabledFontColor;
    else if (isPressed() && style.downFontColor != null)
      fontColor = style.downFontColor;
    else if (isChecked && style.checkedFontColor != null)
View Full Code Here

    }

    public TextButtonStyle (TextButtonStyle style) {
      super(style);
      this.font = style.font;
      if (style.fontColor != null) this.fontColor = new Color(style.fontColor);
      if (style.downFontColor != null) this.downFontColor = new Color(style.downFontColor);
      if (style.overFontColor != null) this.overFontColor = new Color(style.overFontColor);
      if (style.checkedFontColor != null) this.checkedFontColor = new Color(style.checkedFontColor);
      if (style.checkedOverFontColor != null) this.checkedFontColor = new Color(style.checkedOverFontColor);
      if (style.disabledFontColor != null) this.disabledFontColor = new Color(style.disabledFontColor);
    }
View Full Code Here

    else if (clickListener.isOver() && style.backgroundOver != null)
      background = style.backgroundOver;
    else
      background = style.background;
    final BitmapFont font = style.font;
    final Color fontColor = (disabled && style.disabledFontColor != null) ? style.disabledFontColor : style.fontColor;

    Color color = getColor();
    float x = getX();
    float y = getY();
    float width = getWidth();
    float height = getHeight();
View Full Code Here

    }

    public SelectBoxStyle (SelectBoxStyle style) {
      this.font = style.font;
      this.fontColor.set(style.fontColor);
      if (style.disabledFontColor != null) this.disabledFontColor = new Color(style.disabledFontColor);
      this.background = style.background;
      this.backgroundOver = style.backgroundOver;
      this.backgroundOpen = style.backgroundOpen;
      this.backgroundDisabled = style.backgroundDisabled;
      this.scrollStyle = new ScrollPaneStyle(style.scrollStyle);
View Full Code Here

  }

  public void draw (SpriteBatch batch, float parentAlpha) {
    validate();

    Color color = getColor();
    batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);

    float x = getX();
    float y = getY();
    float scaleX = getScaleX();
View Full Code Here

    float x = getX(), y = getY();
    float width = getWidth(), height = getHeight();
    float padTop = getPadTop();

    if (style.stageBackground != null) {
      Color color = getColor();
      batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
      Stage stage = getStage();
      stageToLocalCoordinates(/* in/out */tmpPosition.set(0, 0));
      stageToLocalCoordinates(/* in/out */tmpSize.set(stage.getWidth(), stage.getHeight()));
      style.stageBackground.draw(batch, x + tmpPosition.x, y + tmpPosition.y, x + tmpSize.x, y + tmpSize.y);
View Full Code Here

    }

    public WindowStyle (WindowStyle style) {
      this.background = style.background;
      this.titleFont = style.titleFont;
      this.titleFontColor = new Color(style.titleFontColor);
    }
View Full Code Here

    // Caculate the scissor bounds based on the batch transform, the available widget area and the camera transform. We need to
    // project those to screen coordinates for OpenGL ES to consume.
    getStage().calculateScissors(widgetAreaBounds, scissorBounds);

    // Draw the background ninepatch.
    Color color = getColor();
    batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
    if (style.background != null) style.background.draw(batch, 0, 0, getWidth(), getHeight());
    batch.flush();

    // Enable scissors for widget area and draw the widget.
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.Color

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.