Class Styles.ListStyle

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

public static class Styles.ListStyle extends Object
The style for a ListBox, see TextraListBox.
  • Field Summary

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

    Constructors
    Constructor
    Description
     
    ListStyle(com.badlogic.gdx.graphics.g2d.BitmapFont font, com.badlogic.gdx.graphics.Color fontColorSelected, com.badlogic.gdx.graphics.Color fontColorUnselected, com.badlogic.gdx.scenes.scene2d.utils.Drawable selection)
    Deprecated.
    Create a Font from your BitmapFont once and pass that to constructors instead.
    ListStyle(com.badlogic.gdx.scenes.scene2d.ui.List.ListStyle style)
    Deprecated.
    Create a Font from your BitmapFont once and pass that to constructors instead.
    ListStyle(Font font, com.badlogic.gdx.graphics.Color fontColorSelected, com.badlogic.gdx.graphics.Color fontColorUnselected, com.badlogic.gdx.scenes.scene2d.utils.Drawable selection)
     
    ListStyle(Font font, com.badlogic.gdx.graphics.Color fontColorSelected, com.badlogic.gdx.graphics.Color fontColorUnselected, com.badlogic.gdx.scenes.scene2d.utils.Drawable selection, com.badlogic.gdx.scenes.scene2d.utils.Drawable down, com.badlogic.gdx.scenes.scene2d.utils.Drawable over, 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
    • fontColorSelected

      public com.badlogic.gdx.graphics.Color fontColorSelected
    • fontColorUnselected

      public com.badlogic.gdx.graphics.Color fontColorUnselected
    • selection

      public com.badlogic.gdx.scenes.scene2d.utils.Drawable selection
    • down

      @Null public com.badlogic.gdx.scenes.scene2d.utils.Drawable down
    • over

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

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

    • ListStyle

      public ListStyle()
    • ListStyle

      public ListStyle(Font font, com.badlogic.gdx.graphics.Color fontColorSelected, com.badlogic.gdx.graphics.Color fontColorUnselected, com.badlogic.gdx.scenes.scene2d.utils.Drawable selection)
    • ListStyle

      @Deprecated public ListStyle(com.badlogic.gdx.graphics.g2d.BitmapFont font, com.badlogic.gdx.graphics.Color fontColorSelected, com.badlogic.gdx.graphics.Color fontColorUnselected, com.badlogic.gdx.scenes.scene2d.utils.Drawable selection)
      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
      fontColorSelected - the color to tint the given BitmapFont when it is selected
      fontColorUnselected - the color to tint the given BitmapFont when it is not selected
      selection - typically a solid box that will be drawn behind a selected item
    • ListStyle

      public ListStyle(Font font, com.badlogic.gdx.graphics.Color fontColorSelected, com.badlogic.gdx.graphics.Color fontColorUnselected, com.badlogic.gdx.scenes.scene2d.utils.Drawable selection, @Null com.badlogic.gdx.scenes.scene2d.utils.Drawable down, @Null com.badlogic.gdx.scenes.scene2d.utils.Drawable over, @Null com.badlogic.gdx.scenes.scene2d.utils.Drawable background)
    • ListStyle

      public ListStyle(Styles.ListStyle style)
    • ListStyle

      @Deprecated public ListStyle(com.badlogic.gdx.scenes.scene2d.ui.List.ListStyle 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