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

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


  public GameOver() {
    super();
    text = "Game Over";
    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;
    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

      }
    });

   
 
    LabelStyle ls = new LabelStyle(bonzai,Color.WHITE);
    label = new Label("Test Game", ls);
    label.setX(0);
   
    label.setY(Gdx.graphics.getHeight()/2+100);
    label.setWidth(width);
View Full Code Here

          int pointer, int button) {
        game.setScreen(new GameScreen(game));
      }
    });
   
    LabelStyle ls = new LabelStyle(white, Color.WHITE);
    label = new Label("Angry Masons", ls);
    label.setX(0);
    label.setY(Gdx.graphics.getHeight() / 2 + 100);
    label.setWidth(width);
    label.setAlignment(Align.center);
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 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 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);

    setWidth(getPrefWidth());
    setHeight(getPrefHeight());
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

  public TextButton (String text, TextButtonStyle style) {
    super();
    setStyle(style);
    this.style = style;
    label = new Label(text, new LabelStyle(style.font, style.fontColor));
    label.setAlignment(Align.center);
    add(label).expand().fill();
    setWidth(getPrefWidth());
    setHeight(getPrefHeight());
  }
View Full Code Here

    if (!(style instanceof TextButtonStyle)) throw new IllegalArgumentException("style must be a TextButtonStyle.");
    super.setStyle(style);
    this.style = (TextButtonStyle)style;
    if (label != null) {
      TextButtonStyle textButtonStyle = (TextButtonStyle)style;
      LabelStyle labelStyle = label.getStyle();
      labelStyle.font = textButtonStyle.font;
      labelStyle.fontColor = textButtonStyle.fontColor;
      label.setStyle(labelStyle);
    }
  }
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.