public void draw(Graphics2D g2) {

    g2.setColor(new Color(33, 104, 96));
    g2.fill(new Rectangle2D.Double(0, 0, Window.WIDTH, Window.HEIGHT));

    bigPkm(selected == 0, g2, character.currentPokemon()[0]);
    for (int i = 1; i < 6; i++) {
      smallPkm(selected == i, g2, character.currentPokemon()[i], i - 1);
    }
    if (hasCancel)
      cancelButton(
          selected == totalButtons - 1,
          g2,
          Window.WIDTH - WIDTH3 - 20,
          Window.HEIGHT - HEIGHT3 - 20);
    if (switching) switchingTxt.draw(g2);
    else txt.draw(g2);

    if (menu != null) {
      menu.draw(g2);
      if (menu.result() != null) {
        if (menu.result().equals("Switch")) {
          if (inBattle) {
            switchIndex = selected;
            over = true;
          } else {
            switchIndex = selected;
            switching = true;
          }
        }
        menu = null;
      }
    }
  }
Esempio n. 2
0
  protected void paint(Graphics g) {
    g.setColor(Theme.TWITTER_BLUE_COLOR);
    g.fillRect(0, 0, getWidth(), getHeight());

    if (menu.isActive() == false && statusMenu.isActive() == false) {
      statusList.draw(
          g, statuses, menuBar.getHeight() + verticalScroll + TalkBalloon.textFont.getHeight() / 2);
      menuBar.draw(g, 0);
    } else if (menu.isActive()) {
      menu.draw(g);
    } else if (statusMenu.isActive()) {
      statusMenu.draw(g);
    }
  }
Esempio n. 3
0
 private void paintMenu(Graphics2D g2d) {
   if (showMenu == true) {
     if (c.getPoints() > c.getHighscore().getLowestPointsInTable() && c.getLifes() == 0) {
       menu.setState(4);
     }
     menu.draw(g2d);
   }
 }