Package com.badlogic.gdx.graphics.g2d

Examples of com.badlogic.gdx.graphics.g2d.BitmapFontCache


  private HAlignment halign;
  private float lastWidth = -1;

  public Label (String name, BitmapFont font) {
    super(name);
    cache = new BitmapFontCache(font);
  }
View Full Code Here


    bounds.set(cache.getFont().getWrappedBounds(text, width));
    cache.setWrappedText(text, 0, cache.getFont().isFlipped() ? 0 : bounds.height, width, halign);
  }

  public void setFont (BitmapFont font) {
    cache = new BitmapFontCache(font);
    switch (wrapType) {
    case singleLine:
      setText(text);
      break;
    case multiLine:
View Full Code Here

    touchable = false;
  }

  public void setStyle (LabelStyle style) {
    this.style = style;
    cache = new BitmapFontCache(style.font);
    cache.setColor(style.fontColor);
    setText(text);
  }
View Full Code Here

  public void setStyle (LabelStyle style) {
    if (style == null) throw new IllegalArgumentException("style cannot be null.");
    if (style.font == null) throw new IllegalArgumentException("Missing LabelStyle font.");
    this.style = style;
    cache = new BitmapFontCache(style.font, style.font.usesIntegerPositions());
    invalidateHierarchy();
  }
View Full Code Here

  public void setStyle (WindowStyle style) {
    if (style == null) throw new IllegalArgumentException("style cannot be null.");
    this.style = style;
    setBackground(style.background);
    titleCache = new BitmapFontCache(style.titleFont);
    titleCache.setColor(style.titleFontColor);
    if (title != null) setTitle(title);
    invalidateHierarchy();
  }
View Full Code Here

  public void setStyle (WindowStyle style) {
    if (style == null) throw new IllegalArgumentException("style cannot be null.");
    this.style = style;
    setBackground(style.background);
    titleCache = new BitmapFontCache(style.titleFont);
    titleCache.setColor(style.titleFontColor);
    if (title != null) setTitle(title);
    invalidateHierarchy();
  }
View Full Code Here

  public void setStyle (LabelStyle style) {
    if (style == null) throw new IllegalArgumentException("style cannot be null.");
    if (style.font == null) throw new IllegalArgumentException("Missing LabelStyle font.");
    this.style = style;
    cache = new BitmapFontCache(style.font, style.font.usesIntegerPositions());
    invalidateHierarchy();
  }
View Full Code Here

  public void setStyle (WindowStyle style) {
    if (style == null) throw new IllegalArgumentException("style cannot be null.");
    this.style = style;
    setBackground(style.background);
    titleCache = new BitmapFontCache(style.titleFont);
    titleCache.setColor(style.titleFontColor);
    invalidateHierarchy();
  }
View Full Code Here

  public void setStyle (LabelStyle style) {
    if (style == null) throw new IllegalArgumentException("style cannot be null.");
    if (style.font == null) throw new IllegalArgumentException("Missing LabelStyle font.");
    this.style = style;
    cache = new BitmapFontCache(style.font);
    if (style.fontColor != null) cache.setColor(style.fontColor);
    computeBounds();
    invalidateHierarchy();
  }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.g2d.BitmapFontCache

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.