Exemplo n.º 1
0
 public void paintComponent(Graphics g) {
   g.drawImage(background, 0, 0, this);
   g.drawImage(start[0], 570, 320, this);
   // Buttons
   if (570 < mx && mx < 750 && 320 < my && my < 370) {
     g.drawImage(start[1], 570, 320, this);
   }
   g.drawImage(load[0], 570, 380, this);
   if (570 < mx && mx < 750 && 380 < my && my < 430) {
     g.drawImage(load[1], 570, 380, this);
   }
   // Instructions Screen
   if (drawn) {
     g.drawImage(intro, -5, -14, this);
   }
   g.drawImage(instr[0], 570, 440, this);
   if (570 < mx && mx < 750 && 440 < my && my < 490) {
     g.drawImage(instr[1], 570, 440, this);
   }
   if (getWords.getPressed() && !getWords.getCurrent().equals("")) {
     loadPlayer(getWords.getCurrent());
     getWords.setVisible(false);
     getWords = new inputBox("Load Game");
     newGame = true;
   }
 }
Exemplo n.º 2
0
 public void mouseReleased(MouseEvent e) {
   mb = false;
   if (570 < mx && mx < 750 && 380 < my && my < 430) {
     getWords = new inputBox("Load Game");
     getWords.setVisible(true);
   }
   if (570 < mx && mx < 750 && 320 < my && my < 370) {
     newGame = true;
   }
   if (570 < mx && mx < 750 && 440 < my && my < 490) {
     drawn = !drawn;
   }
 }