Package com.badlogic.gdx.scenes.scene2d.ui.Label

Examples of com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle


  }

  /** Adds a new cell with a label. This may only be called if {@link Table#Table(Skin)} or {@link #setSkin(Skin)} was used. */
  public Cell<Label> add (String text, String fontName, Color color) {
    if (skin == null) throw new IllegalStateException("Table must have a skin set to use this method.");
    return add(new Label(text, new LabelStyle(skin.getFont(fontName), color)));
  }
View Full Code Here


  }

  /** Adds a new cell with a label. This may only be called if {@link Table#Table(Skin)} or {@link #setSkin(Skin)} was used. */
  public Cell<Label> add (String text, String fontName, String colorName) {
    if (skin == null) throw new IllegalStateException("Table must have a skin set to use this method.");
    return add(new Label(text, new LabelStyle(skin.getFont(fontName), skin.getColor(colorName))));
  }
View Full Code Here

    image = new Image();
    image.setScaling(Scaling.fit);
    add(image);

    label = new Label(text, new LabelStyle(style.font, style.fontColor));
    label.setAlignment(Align.center);
    add(label);

    setStyle(style);
View Full Code Here

    super.setStyle(style);
    this.style = (ImageTextButtonStyle)style;
    if (image != null) updateImage();
    if (label != null) {
      ImageTextButtonStyle textButtonStyle = (ImageTextButtonStyle)style;
      LabelStyle labelStyle = label.getStyle();
      labelStyle.font = textButtonStyle.font;
      labelStyle.fontColor = textButtonStyle.fontColor;
      label.setStyle(labelStyle);
    }
  }
View Full Code Here

  }

  /** Adds a new cell with a label. This may only be called if {@link Table#Table(Skin)} or {@link #setSkin(Skin)} was used. */
  public Cell<Label> add (String text, String fontName, Color color) {
    if (skin == null) throw new IllegalStateException("Table must have a skin set to use this method.");
    return add(new Label(text, new LabelStyle(skin.getFont(fontName), color)));
  }
View Full Code Here

  }

  /** Adds a new cell with a label. This may only be called if {@link Table#Table(Skin)} or {@link #setSkin(Skin)} was used. */
  public Cell<Label> add (String text, String fontName, String colorName) {
    if (skin == null) throw new IllegalStateException("Table must have a skin set to use this method.");
    return add(new Label(text, new LabelStyle(skin.getFont(fontName), skin.getColor(colorName))));
  }
View Full Code Here

    super();
    text = "Continue?";
    font = new BitmapFont(Gdx.files.internal("data/fonts/bonzai24.fnt"),
        Gdx.files.internal("data/fonts/bonzai24.png"), false);
   
    LabelStyle ls = new LabelStyle(Configuration.bonzai24,Color.WHITE);
    label = new Label(text, ls);
    label.setAlignment(Align.center);
  }
View Full Code Here

  public Victory() {
    super();
    text = "Victory";
    font = Configuration.bonzai32;
   
    LabelStyle ls = new LabelStyle(font,Color.WHITE);
    label = new Label(text, ls);
    label.setAlignment(Align.center);
  }
View Full Code Here

    super();
    this.text = message.toString();
    this.font = font;
    this.id=id;
   
    LabelStyle ls = new LabelStyle(this.font,Color.WHITE);
    label = new Label(text, ls);
    label.setFontScale(1*Configuration.gameScale/20);
    label.setAlignment(Align.center);
  }
 
View Full Code Here

  public Pause() {
    super();
    text = "Paused";
    font = Configuration.bonzai32;
   
    LabelStyle ls = new LabelStyle(font,Color.WHITE);
    label = new Label(text, ls);
    label.setAlignment(Align.center);
  }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle

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.