Class TextraArea

java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.ui.Widget
com.github.tommyettinger.textra.TextraField
com.github.tommyettinger.textra.TextraArea
All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.utils.Disableable, com.badlogic.gdx.scenes.scene2d.utils.Layout

public class TextraArea extends TextraField
A multiple-line TextraField using a Font; not ready for production yet.
If you have to use Font but don't need multiple lines, TextraField should work. If you do need multiple-line input, you can use a libGDX BitmapFont with a scene2d.ui TextField. If you don't need input, just selectable text, you can make a TypingLabel selectable with TypingLabel.setSelectable(boolean), probably also using TypingLabel.skipToTheEnd().
  • Constructor Details

    • TextraArea

      public TextraArea(@Null String text, com.badlogic.gdx.scenes.scene2d.ui.Skin skin)
    • TextraArea

      public TextraArea(@Null String text, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, Font replacementFont)
    • TextraArea

      public TextraArea(@Null String text, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, String styleName)
    • TextraArea

      public TextraArea(String text, Styles.TextFieldStyle style)
    • TextraArea

      public TextraArea(String text, Styles.TextFieldStyle style, Font replacementFont)
  • Method Details

    • sizeChanged

      protected void sizeChanged()
      Overrides:
      sizeChanged in class TextraField
    • drawCursor

      protected void drawCursor(com.badlogic.gdx.scenes.scene2d.utils.Drawable cursorPatch, com.badlogic.gdx.graphics.g2d.Batch batch, Font font, float x, float y)
      Overrides:
      drawCursor in class TextraField
    • getTextY

      protected float getTextY(Font font, @Null com.badlogic.gdx.scenes.scene2d.utils.Drawable background)
      Overrides:
      getTextY in class TextraField