Class Styles.LabelStyle

java.lang.Object
com.github.tommyettinger.textra.Styles.LabelStyle
Enclosing class:
Styles

public static class Styles.LabelStyle extends Object
The style for a TextraLabel or TypingLabel.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    com.badlogic.gdx.scenes.scene2d.utils.Drawable
     
     
    com.badlogic.gdx.graphics.Color
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    LabelStyle(com.badlogic.gdx.graphics.g2d.BitmapFont font, com.badlogic.gdx.graphics.Color fontColor)
    Deprecated.
    Create a Font from your BitmapFont once and pass that to constructors instead.
    LabelStyle(com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle style)
    Deprecated.
    Create a Font from your BitmapFont once and pass that to constructors instead.
    LabelStyle(Font font, com.badlogic.gdx.graphics.Color fontColor)
     
    LabelStyle(Font font, com.badlogic.gdx.graphics.Color fontColor, com.badlogic.gdx.scenes.scene2d.utils.Drawable background)
     
     
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • font

      public Font font
    • fontColor

      @Null public com.badlogic.gdx.graphics.Color fontColor
    • background

      @Null public com.badlogic.gdx.scenes.scene2d.utils.Drawable background
  • Constructor Details

    • LabelStyle

      public LabelStyle()
    • LabelStyle

      public LabelStyle(Font font, @Null com.badlogic.gdx.graphics.Color fontColor)
    • LabelStyle

      public LabelStyle(Font font, @Null com.badlogic.gdx.graphics.Color fontColor, @Null com.badlogic.gdx.scenes.scene2d.utils.Drawable background)
    • LabelStyle

      @Deprecated public LabelStyle(com.badlogic.gdx.graphics.g2d.BitmapFont font, @Null com.badlogic.gdx.graphics.Color fontColor)
      Deprecated.
      Create a Font from your BitmapFont once and pass that to constructors instead.
      You should almost always avoid calling this constructor directly, because it allocates a new Font object every time (copying information from the given BitmapFont), and it isn't easy to dispose the created Font.
      Parameters:
      font - a BitmapFont that will be copied into a new Font
      fontColor - the color to tint the given BitmapFont
    • LabelStyle

      public LabelStyle(Styles.LabelStyle style)
    • LabelStyle

      @Deprecated public LabelStyle(com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle style)
      Deprecated.
      Create a Font from your BitmapFont once and pass that to constructors instead.
      You should almost always avoid calling this constructor directly, because it allocates a new Font object every time (copying information from the given style), and it isn't easy to dispose the created Font.
      Parameters:
      style - a Label.LabelStyle that will have its data and BitmapFont copied into this and its Font