Modification menu jouer

This commit is contained in:
Moncef STITI 2024-04-17 01:39:56 +02:00
parent ff2448dc86
commit c75731439b
3 changed files with 6 additions and 10 deletions

BIN
src/.DS_Store vendored

Binary file not shown.

View File

@ -15,16 +15,12 @@ public class PlayButtonClickListener implements ActionListener {
Button sourceButton = (Button) e.getSource(); Button sourceButton = (Button) e.getSource();
String buttonText = sourceButton.getText(); String buttonText = sourceButton.getText();
if (buttonText.equals("Jouer sans grille")) { if (buttonText.equals("Générer une grille")) {
}
else if (buttonText.equals("Générer une grille")) {
Window.removeAllComponents(this.window); Window.removeAllComponents(this.window);
new GridMakeUserInterfaceView(this.window); new GridMakeUserInterfaceView(this.window);
}
} else if (buttonText.equals("Charger une grille")) { else if (buttonText.equals("Jouer")) {
System.out.println("Bouton jouer presser");
} else if (buttonText.equals("Retour au menu principal")) { } else if (buttonText.equals("Retour au menu principal")) {
if (window.getContentPane().getComponent(0) instanceof PlayMenuView) { if (window.getContentPane().getComponent(0) instanceof PlayMenuView) {
Window.removeAllComponents(window); Window.removeAllComponents(window);

View File

@ -9,7 +9,7 @@ public class PlayMenuView extends JPanel {
private final Color TITLE_TEXT_COLOR = Color.WHITE; private final Color TITLE_TEXT_COLOR = Color.WHITE;
private final Font TITLE_FONT = new Font("Copperplate", Font.BOLD, 40); private final Font TITLE_FONT = new Font("Copperplate", Font.BOLD, 40);
private final Font BUTTON_FONT = new Font("Copperplate", Font.BOLD, 24); private final Font BUTTON_FONT = new Font("Copperplate", Font.BOLD, 24);
private final String[] BUTTON_TEXTS = {"Jouer sans grille", "Générer une grille", "Charger une grille"}; private final String[] BUTTON_TEXTS = {"Jouer", "Générer une grille"};
private Title titleLabel; private Title titleLabel;
private Button[] playModeButtons; private Button[] playModeButtons;
private Button returnButton; private Button returnButton;