diff --git a/JDR/src/Presentation/Plateau_de_jeu.form b/JDR/src/Presentation/Plateau_de_jeu.form index 57767c0..b9628b0 100644 --- a/JDR/src/Presentation/Plateau_de_jeu.form +++ b/JDR/src/Presentation/Plateau_de_jeu.form @@ -69,6 +69,9 @@ <Properties> <Property name="text" type="java.lang.String" value="Aide"/> </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMIaideActionPerformed"/> + </Events> </MenuItem> <MenuItem class="javax.swing.JMenuItem" name="jMIobjectif"> <Properties> diff --git a/JDR/src/Presentation/Plateau_de_jeu.java b/JDR/src/Presentation/Plateau_de_jeu.java index 478153b..ac0cd3c 100644 --- a/JDR/src/Presentation/Plateau_de_jeu.java +++ b/JDR/src/Presentation/Plateau_de_jeu.java @@ -343,6 +343,11 @@ public class Plateau_de_jeu extends javax.swing.JFrame { jMenu2.setText("??"); jMIaide.setText("Aide"); + jMIaide.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jMIaideActionPerformed(evt); + } + }); jMenu2.add(jMIaide); jMIobjectif.setText("Objectif"); @@ -442,6 +447,11 @@ public class Plateau_de_jeu extends javax.swing.JFrame { // TODO add your handling code here: }//GEN-LAST:event_jMIobjectifActionPerformed + private void jMIaideActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMIaideActionPerformed + information j = new information(); + j.aide(); + }//GEN-LAST:event_jMIaideActionPerformed + private void majStatistiquesPersos(){ diff --git a/JDR/src/Presentation/information.java b/JDR/src/Presentation/information.java new file mode 100644 index 0000000..f546971 --- /dev/null +++ b/JDR/src/Presentation/information.java @@ -0,0 +1,30 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package Presentation; + +import javax.swing.JOptionPane; + +/** + * + * @author emile.lalorcey + */ +public class information { + + public information(){ + + } + + public void aide(){ + String text = "Vous voici dans un jeu\n" + + "Ce jeu se d�roule comme un battle royal,\n" + + "en effet il ne s'arr�te que si 1 seul personnage est encore en vie\n" + + "Amusez-vous bien !"; + JOptionPane.showMessageDialog(null, text, "Aide envoy�", JOptionPane.INFORMATION_MESSAGE); + } + + public void objectif(){ + + } +}