modification makefile + transsition fenetre pair programing
This commit is contained in:
+1
-4
@@ -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
|
||||
|
||||
+4
-1
@@ -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.
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.
@@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user