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

    • register

      public static void register()
      This allows the terminal to attach its UI to the current screen's 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
    • getShell

      public static Shell getShell()
      Returns:
      the current Shell instance