Class TerminalDisplay

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

public class TerminalDisplay extends UIComponent
A UI component for displaying the global debug terminal. This class handles the visual representation of the terminal, including its background, text history, and input line with a blinking cursor.
  • Constructor Details

    • TerminalDisplay

      public TerminalDisplay()
  • Method Details

    • create

      public void create()
      Description copied from class: Component
      Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.
      Overrides:
      create in class UIComponent
    • getRoot

      public com.badlogic.gdx.scenes.scene2d.Actor getRoot()
      Gets the root actor of the terminal display.
      Returns:
      The root actor.
    • getInput

      public String getInput()
    • getInputField

      public com.badlogic.gdx.scenes.scene2d.ui.TextField getInputField()
    • getHistoryArea

      public com.badlogic.gdx.scenes.scene2d.ui.TextArea getHistoryArea()
    • clearInput

      public void clearInput()
    • draw

      public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Draws the terminal, setting its visibility based on the terminal's state. The actual drawing is handled by the stage.
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - Batch to render to.
    • dispose

      public void dispose()
      Disposes the current root table to free up resources.
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class RenderComponent