retour direct au menu
This commit is contained in:
parent
53f23d7cf3
commit
d0d1aa9cf8
BIN
Avancee.odt
BIN
Avancee.odt
Binary file not shown.
@ -1,6 +1,5 @@
|
|||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
|
||||||
|
|
||||||
public class Banniere extends JPanel {
|
public class Banniere extends JPanel {
|
||||||
private FrameJeu fenetre;
|
private FrameJeu fenetre;
|
||||||
@ -26,17 +25,17 @@ public class Banniere extends JPanel {
|
|||||||
public void setVictoire(){
|
public void setVictoire(){
|
||||||
this.add(new Fin("Victoire !",this.getSize()));
|
this.add(new Fin("Victoire !",this.getSize()));
|
||||||
this.repaint();
|
this.repaint();
|
||||||
JButton menu = new JButton("Revenir au menu");
|
// TODO : délai
|
||||||
menu.addActionListener(new MenuListener(this.fenetre));
|
new FrameMenu();
|
||||||
this.add(menu);
|
this.fenetre.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Méthode pour indiquer au joueur sa Défaite
|
// Méthode pour indiquer au joueur sa Défaite
|
||||||
public void setDefaite(){
|
public void setDefaite(){
|
||||||
this.add(new Fin("Défaite !",this.getSize()));
|
this.add(new Fin("Défaite !",this.getSize()));
|
||||||
this.repaint();
|
this.repaint();
|
||||||
JButton menu = new JButton("Revenir au menu");
|
// TODO : délai
|
||||||
menu.addActionListener(new MenuListener(this.fenetre));
|
new FrameMenu();
|
||||||
this.add(menu);
|
this.fenetre.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,9 +26,9 @@ public class FrameMenu extends JFrame{
|
|||||||
|
|
||||||
|
|
||||||
// On créer les zones de textes de saisie
|
// On créer les zones de textes de saisie
|
||||||
this.sliderLignes = new JSlider(4,30);
|
this.sliderLignes = new JSlider(4,30,20);
|
||||||
this.sliderColonnes = new JSlider(4,30);
|
this.sliderColonnes = new JSlider(4,30,25);
|
||||||
this.sliderMines = new JSlider(1,900, 16);
|
this.sliderMines = new JSlider(1,900, 50);
|
||||||
|
|
||||||
sliderLignes.addChangeListener(new SettingsListener(0,this));
|
sliderLignes.addChangeListener(new SettingsListener(0,this));
|
||||||
sliderColonnes.addChangeListener(new SettingsListener(1,this));
|
sliderColonnes.addChangeListener(new SettingsListener(1,this));
|
||||||
|
BIN
Rapport.odt
Normal file
BIN
Rapport.odt
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user