All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class GUI extends JFrame
Graphical User Interface class responsible for all GUI components and logic used by the App.
See Also:
  • Field Details

  • Constructor Details

    • GUI

      public GUI(App app)
      Constructor for GUI.
      Parameters:
      app - The App object that is using this
  • Method Details

    • getLogPanel

      public static LogPanel getLogPanel()
      Gets the log panel of this GUI.
      Returns:
      the log panel
    • configureGUI

      public void configureGUI(App app)
      Configures the App GUI to be displayed.
      Parameters:
      app - The App to attach the GUI to.
    • updateSaveInventory

      public void updateSaveInventory(int index, Domain save)
      Updates the current save inventory panel to the correct one.
      Parameters:
      index - the index of the inventory to be displayed
      save - the save to be displayed
    • getRenderPanel

      public MazeRenderer getRenderPanel()
      Gets the Maze Renderer of this GUI.
      Returns:
      the Maze Renderer
    • getInventory

      public InventoryPanel getInventory()
      Gets the Inventory Renderer of this GUI.
      Returns:
      the Inventory Renderer
    • transitionToMenuScreen

      public void transitionToMenuScreen()
      Transitions to the menu screen.
    • transitionToLoadScreen

      public void transitionToLoadScreen(App app)
      Brings up the save game screen.
      Parameters:
      app - the app to be loaded
    • transitionToSaveScreen

      public void transitionToSaveScreen(App app)
      Brings up the save game screen.
      Parameters:
      app - the app to be saved
    • transitionToGameScreen

      public void transitionToGameScreen()
      Transitions to the game screen.
    • transitionToReplayScreen

      public void transitionToReplayScreen()
      Transitions to the game screen.
    • transitionToWinScreen

      public void transitionToWinScreen()
      Transitions to the winning screen.
    • transitionToLostScreen

      public void transitionToLostScreen()
      Transitions to the losing screen.
    • showPausePanel

      public void showPausePanel()
      Brings up the pause screen.
    • showResumePanel

      public void showResumePanel()
      Hides the pause screen and continue with resume screen.