Class TerminalService

java.lang.Object
com.csse3200.game.ui.terminal.TerminalService

public class TerminalService extends Object
A Static class that manages the game's global debug terminal.
  • Method Details

    • setStage

      public static void setStage(com.badlogic.gdx.scenes.scene2d.Stage stageValue)
      Called by the RenderService when a new Stage is set. This allows the terminal to attach its UI to the current screen's stage.
      Parameters:
      stageValue - The newly active Stage.
    • getTerminalDisplay

      public static TerminalDisplay getTerminalDisplay()
      Returns the current terminal display object
      Returns:
      TerminalDisplay
    • toggle

      public static void toggle()
      Toggle the terminal display on or off
    • focusTerminalInput

      public static void focusTerminalInput()
      Focus the terminal input (the bottom pane where text is entered)
    • executeCurrentCommand

      public static void executeCurrentCommand()
      Execute the given command in the terminal
    • print

      public static void print(Object obj)
      Print string representation of the give object to the terminal. Nothing is printed if the object is null.
      Parameters:
      obj - the object to be printed