Package com.csse3200.game.ui.terminal
Class TerminalService
java.lang.Object
com.csse3200.game.ui.terminal.TerminalService
A Static class that manages the game's global debug terminal.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidExecute the given command in the terminalstatic voidFocus the terminal input (the bottom pane where text is entered)static ShellgetShell()static TerminalDisplayReturns the current terminal display objectstatic voidPrint string representation of the give object to the terminal.static voidregister()This allows the terminal to attach its UI to the current screen's stage.static voidtoggle()Toggle the terminal display on or off
-
Method Details
-
register
public static void register()This allows the terminal to attach its UI to the current screen's stage. -
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
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
- Returns:
- the current Shell instance
-