Ejemplo n.º 1
0
  public void addGamePanels() {
    gamePanel = new GameSelectionPanels(resWidth, resHeight);
    for (int i = 0; i < gamePanel.getNumberOfPanels(); i++) { // Adds the
      // game
      // panels to
      // the
      // content
      // pane.
      contentPane.add(gamePanel.getPanel(i), "p1");
    }

    this.controller.updateButtons(gamePanel.buttons());
  }
Ejemplo n.º 2
0
 // 140509 TA
 public void setCurrentPanel(String panelName) {
   if (panelName.equals("Main")) currentPanel = mainMenu;
   else if (panelName.equals("Games")) currentPanel = gamePanel.getPanel(0);
   else if (panelName.equals("Options")) currentPanel = optionsMenu;
   else if (panelName.equals("About")) currentPanel = aboutMenu;
 }
Ejemplo n.º 3
0
 /**
  * Returns the 1st game panel
  *
  * @return game menu panel
  */
 public JPanel getGamePanel() {
   return gamePanel.getPanel(0);
 }