Package com.badlogic.gdx.graphics

Examples of com.badlogic.gdx.graphics.Color


    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


    final Drawable knob = (disabled && style.disabledKnob != null) ? style.disabledKnob : style.knob;
    final Drawable bg = (disabled && style.disabledBackground != null) ? style.disabledBackground : style.background;
    final Drawable knobBefore = (disabled && style.disabledKnobBefore != null) ? style.disabledKnobBefore : style.knobBefore;
    final Drawable knobAfter = (disabled && style.disabledKnobAfter != null) ? style.disabledKnobAfter : style.knobAfter;

    Color color = getColor();
    float x = getX();
    float y = getY();
    float width = getWidth();
    float height = getHeight();
    float knobHeight = knob == null ? 0 : knob.getMinHeight();
View Full Code Here

      image.setDrawable(style.imageUp);
  }

  public void draw (Batch 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

  /** Called to draw the background, before clipping is applied (if enabled). Default implementation draws the background
   * drawable. */
  protected void drawBackground (Batch batch, float parentAlpha, float x, float y) {
    if (background == null) return;
    Color color = getColor();
    batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
    background.draw(batch, x, y, getWidth(), 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

    // @on

    dodistortion = barrelDistortion;

    vtint = new Vector3();
    tint = new Color();
    chromaticDispersion = new Vector2();

    setTime(0f);
    setTint(1.0f, 1.0f, 0.85f);
    setDistortion(0.3f);
View Full Code Here

    background = ResourceFactory.newSprite( "bgnd.jpg" );
    background.setSize( width, height );

    // panel background
    NinePatch np = new NinePatch( ResourceFactory.newTexture( "brushed.png", false ), 0, 0, 0, 0 );
    np.setColor( new Color( 0.3f, 0.3f, 0.3f, 1f ) );
    NinePatchDrawable npBack = new NinePatchDrawable( np );

    // build the top panel and add all of its widgets
    Table topPanel = buildTopPanel( npBack, width, height );
    topPanel.add( buildGlobalSettingsWidgets() );
View Full Code Here

    final Slider slCrtTintR = ResourceFactory.newSlider( 0, 1f, 0.01f, post.crt.getTint().r, new ChangeListener() {
      @Override
      public void changed( ChangeEvent event, Actor actor ) {
        Slider source = (Slider)event.getListenerActor();
        Color tint = post.crt.getTint();
        tint.r = source.getValue();
        post.crt.setTint( tint );
      }
    } );

    final Slider slCrtTintG = ResourceFactory.newSlider( 0, 1f, 0.01f, post.crt.getTint().g, new ChangeListener() {
      @Override
      public void changed( ChangeEvent event, Actor actor ) {
        Slider source = (Slider)event.getListenerActor();
        Color tint = post.crt.getTint();
        tint.g = source.getValue();
        post.crt.setTint( tint );
      }
    } );

    final Slider slCrtTintB = ResourceFactory.newSlider( 0, 1f, 0.01f, post.crt.getTint().b, new ChangeListener() {
      @Override
      public void changed( ChangeEvent event, Actor actor ) {
        Slider source = (Slider)event.getListenerActor();
        Color tint = post.crt.getTint();
        tint.b = source.getValue();
        post.crt.setTint( tint );
      }
    } );
View Full Code Here

  /** Called to draw the background, before clipping is applied (if enabled). Default implementation draws the background
   * drawable. */
  protected void drawBackground (Batch batch, float parentAlpha, float x, float y) {
    if (background == null) return;
    Color color = getColor();
    batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
    background.draw(batch, x, y, getWidth(), getHeight());
  }
View Full Code Here

                    g = p;
                    b = q;
                    break;
            }
        }
        return new Color(r, g, b, 1f);
    }
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.