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

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


  }

  public TextButton (String text, TextButtonStyle style, String name) {
    super(style, name);
    this.style = style;
    label = new Label(text, new LabelStyle(style.font, style.fontColor));
    label.setAlignment(Align.CENTER);
    add(label).expand().fill();
    width = getPrefWidth();
    height = 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.