Class CutsceneTextDisplay

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Renderable, Comparable<Renderable>

public class CutsceneTextDisplay extends UIComponent
CutsceneTextDisplay handles displaying scrolling text during a cutscene. The text is displayed one character at a time, and pressing ENTER will skip the scrolling and display the full text immediately.
  • Constructor Details

    • CutsceneTextDisplay

      public CutsceneTextDisplay(boolean visible)
      Default constructor that initializes without a specific cutscene.
    • CutsceneTextDisplay

      public CutsceneTextDisplay(com.badlogic.gdx.scenes.scene2d.ui.Skin skin)
  • Method Details

    • create

      public void create()
      Sets up the text display UI, including the background image and text label, and adds it to the stage.
      Overrides:
      create in class UIComponent
    • draw

      public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Custom draw method to handle additional rendering. Drawing is handled by the stage, so no custom drawing is needed here.
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - Batch to render to.
    • setText

      public void setText(String text)
    • setStage

      public void setStage(com.badlogic.gdx.scenes.scene2d.Stage stage)
      Sets the stage for this UI component.
      Parameters:
      stage - The stage to assign.
    • getTable

      public com.badlogic.gdx.scenes.scene2d.ui.Table getTable()
      Returns the main table containing the text display UI components.
      Returns:
      The table containing the display components.