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
 public void render() {
   if (init) {
     init();
     init = false;
   }
   titleLevel.render();
   cancel.draw();
   done.draw();
   // Draw the volume bar!
   NewGLHandler.setCurrentColor(new float[] {0.7f, 0.7f, 0.7f}, false);
   Text.render("Volume:", 40, 60, 16, 16);
   Text.render("Enable Console: ", 40, 260, 16, 16);
   Text.render("Username:", 40, 300, 16, 16);
   NewGLHandler.resetColors();
   volume.draw();
   console.draw();
   username.draw();
 }