modification makefile + transsition fenetre pair programing

This commit is contained in:
2024-10-26 17:40:26 +02:00
parent 5bef75ddba
commit f5c3fa6149
31 changed files with 24 additions and 5 deletions

View File

@@ -16,10 +16,7 @@ public class Main {
MenuModel model = new MenuModel();
MenuView view = new MenuView();
JFrame frame = new JFrame(" Menu");
frame.setSize(1500, 750);
frame.setLocation(0, 0);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JFrame frame = App.getInstance();
frame.add(view);
// Créer le contrôleur

View File

@@ -21,7 +21,7 @@ java/controller/NewListener.class: java/controller/NewListener.java
java/controller/QuiListener.class: java/controller/QuiListener.java
$(JC) $(JCFLAGS) java/controller/QuiListener.java
java/controller/ResListener.class: java/controller/ResListener.java java/view/GameView.class
java/controller/ResListener.class: java/controller/ResListener.java java/view/GameView.class java/view/App.class
$(JC) $(JCFLAGS) java/controller/ResListener.java
java/controller/GameController.class: java/controller/GameController.java java/controller/TilePlacer.class java/model/Tile.class java/controller/CameraController.class java/controller/HexagonMouseListener.class
@@ -66,6 +66,9 @@ java/view/BtnPerso.class: java/view/BtnPerso.java
java/view/ButtonHoverListener.class: java/view/ButtonHoverListener.java
$(JC) $(JCFLAGS) java/view/ButtonHoverListener.java
java/view/App.class: java/view/App.java
$(JC) $(JCFLAGS) java/view/App.java
# Compilation des handlers
java/controller/MousePressHandler.class: java/controller/MousePressHandler.java java/controller/CameraControllerListener.class
$(JC) $(JCFLAGS) java/controller/MousePressHandler.java

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,5 @@
package controller;
import view.App;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -10,6 +11,7 @@ public class ResListener implements ActionListener {
@Override
public void actionPerformed(ActionEvent e) {
SwingUtilities.invokeLater(() -> new GameView());
App.getInstance().dispose();
}
}

View File

@@ -0,0 +1,17 @@
package view;
import javax.swing.*;
public class App {
private static JFrame frame;
public static JFrame getInstance() {
if (frame == null) {
frame = new JFrame("Menu");
frame.setSize(1500, 750);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
return frame;
}
}