Page 171 - MDP2022-3
P. 171
Main.myGame.game.comboCount = 0;
System.out.println("콤보 초기화");
backMain();
}
});
add(backButton);
homeButton.setVisible(false);
homeButton.setBounds(60, 430, 320, 250);
homeButton.setBorderPainted(false);
homeButton.setContentAreaFilled(false);
homeButton.setFocusPainted(false);
homeButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
homeButton.setIcon(resultTabHomeEnteredImage);
homeButton.setCursor(new Cursor(Cursor.HAND_CURSOR));
Music buttonEnteredMusic = new
Music("buttonPressedMusic.mp3" , false);
buttonEnteredMusic.start();
}
@Override
public void mouseExited(MouseEvent e) {
homeButton.setIcon(resultTabHomeBasicImage);
homeButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
@Override
public void mousePressed(MouseEvent e) {
Music buttonEnteredMusic = new
Music("buttonPressedMusic.mp3" , false);
buttonEnteredMusic.start();
//홈버튼으로 돌아가는 이벤트
backMain();
}
});
add(homeButton);
RestartButton.setVisible(false);
RestartButton.setBounds(900, 430, 320, 250);
RestartButton.setBorderPainted(false);
RestartButton.setContentAreaFilled(false);
RestartButton.setFocusPainted(false);
RestartButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {