Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Loïc Perine
ProjetS2-2021-20-JMM
Commits
f015204f
Commit
f015204f
authored
Jun 25, 2021
by
Loïc Perine
Browse files
Test
parent
555b8c75
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/info1/Vue/OptPartie.java
View file @
f015204f
...
...
@@ -3,6 +3,7 @@ package info1.Vue;
import
java.awt.BorderLayout
;
import
java.awt.Dimension
;
import
java.awt.GridLayout
;
import
java.awt.event.ActionListener
;
import
javax.swing.BoxLayout
;
import
javax.swing.JButton
;
...
...
@@ -220,5 +221,8 @@ public class OptPartie extends JPanel {
// contenant : player.getName et game.getID + type (belge, fr) et bouton rejoindre
}
}
//_____________________________________________listeners_____________________________________________//
public
void
FixeListenerCreation
(
ActionListener
listener
)
{
creerPartie
.
addActionListener
(
listener
);}
}
src/info1/application/appli.java
View file @
f015204f
...
...
@@ -16,6 +16,7 @@ import info1.Vue.PageJeu;
import
info1.Vue.ViewManager
;
import
info1.controlleur.AjouterBateau
;
import
info1.controlleur.ChangerVersionControleur
;
import
info1.controlleur.CreerPartieControleur
;
import
info1.controlleur.OuvrirChoixPartieControleur
;
import
info1.controlleur.OuvrirCreditsControleur
;
import
info1.controlleur.OuvrirCreerFlotteControleur
;
...
...
@@ -117,7 +118,11 @@ public class appli {
public
static
void
afficherOptPartie
(
boolean
heberger
)
{
// TODO ajouter les listener
OptPartie
optionsPartie
=
new
OptPartie
(
"Que voulez vous faire ?"
);
if
(
heberger
)
{
optionsPartie
.
afficherHeberger
();
optionsPartie
.
FixeListenerCreation
(
new
CreerPartieControleur
(
optionsPartie
));
}
else
optionsPartie
.
afficherRejoindre
();
fenetre
.
setMainView
(
optionsPartie
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment