Class GameDialog

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

public class GameDialog extends JDialog
Creates Pop-up boxes for our game. There are four types of pop-ups. Pause, GameOver, GameComplete, Save
Author:
Molly
See Also:
  • Constructor Details

    • GameDialog

      public GameDialog(Base base, GameDialog.PopUp type)
      New Dialog window, can create four types based on type passed in.
      Parameters:
      base - current base
      type - Pause, GameOver, GameComplete, Save
    • GameDialog

      public GameDialog(Base base, String message)
      For error pop-ups.
      Parameters:
      base - to set actions on
      message - error message to display
    • GameDialog

      public GameDialog(Base base, int level)
      Pop-up for Next Level.
      Parameters:
      base - to call actions on
      level - which level is the next level
  • Method Details

    • makeBounds

      public void makeBounds()
      Set size and position of pop-up based on fields and current base coordinates.
    • visibleFocus

      public void visibleFocus()
      Set pop-up as visible, in focus and reset its bounds Start timer (only Save pop-up has timer).