From 5d59d8a151e9f08bf265821097ba69fa6f6108d0 Mon Sep 17 00:00:00 2001 From: Justine Yannis Date: Mon, 24 Oct 2022 13:19:22 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Zoom=20pas=20centr=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/fr/iutfbleau/projetAgile/Menu/View/BoutonsMenu.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projetAgile/src/fr/iutfbleau/projetAgile/Menu/View/BoutonsMenu.java b/projetAgile/src/fr/iutfbleau/projetAgile/Menu/View/BoutonsMenu.java index 0f61249..d8ca69d 100644 --- a/projetAgile/src/fr/iutfbleau/projetAgile/Menu/View/BoutonsMenu.java +++ b/projetAgile/src/fr/iutfbleau/projetAgile/Menu/View/BoutonsMenu.java @@ -64,8 +64,8 @@ public class BoutonsMenu extends JComponent{ secondPinceau.drawImage(this.img, 5, 5, this.getWidth()-10, this.getHeight()-10, this); secondPinceau.fillRoundRect(5, 5, this.getWidth()-10, this.getHeight()-10, this.getWidth()/100*9, this.getHeight()/100*29); }else{ - secondPinceau.drawImage(this.img, 0, 0, this.getWidth()-5, this.getHeight()-5, this); - secondPinceau.fillRoundRect(0, 0, this.getWidth()-5, this.getHeight()-5, this.getWidth()/100*9, this.getHeight()/100*29); + secondPinceau.drawImage(this.img, 0, 0, this.getWidth(), this.getHeight(), this); + secondPinceau.fillRoundRect(0, 0, this.getWidth(), this.getHeight(), this.getWidth()/100*9, this.getHeight()/100*29); } secondPinceau.setColor(new Color(255, 255, 255)); secondPinceau.setFont(new Font(Font.SANS_SERIF, Font.BOLD, (this.getWidth()/10))); From 921698c2c8598c12140c65f13854017a8b81325e Mon Sep 17 00:00:00 2001 From: Justine Yannis Date: Mon, 24 Oct 2022 13:32:08 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Ajout=20transparence=20pion=20pas=20encore?= =?UTF-8?q?=20plac=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projetAgile/Puissance4/View/Pion.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/projetAgile/src/fr/iutfbleau/projetAgile/Puissance4/View/Pion.java b/projetAgile/src/fr/iutfbleau/projetAgile/Puissance4/View/Pion.java index cf11911..f632538 100644 --- a/projetAgile/src/fr/iutfbleau/projetAgile/Puissance4/View/Pion.java +++ b/projetAgile/src/fr/iutfbleau/projetAgile/Puissance4/View/Pion.java @@ -2,9 +2,8 @@ package fr.iutfbleau.projetAgile.Puissance4.View; import java.awt.*; import javax.swing.*; +import fr.iutfbleau.projetAgile.Puissance4.Utils.Constants; -import fr.iutfbleau.projetAgile.Puissance4.Utils.Constants; -import fr.iutfbleau.projetAgile.Puissance4.Utils.Constants; public class Pion extends JComponent{ @@ -64,10 +63,13 @@ public class Pion extends JComponent{ break; } if(this.hover) { - g2.setColor(Pion.HIGHLIGHT_COLOR); - g2.fillRect(0, 0, this.getWidth(), this.getHeight()); + g2.setColor(new Color(Pion.HIGHLIGHT_COLOR.getRed(),Pion.HIGHLIGHT_COLOR.getGreen(),Pion.HIGHLIGHT_COLOR.getBlue(), 100)); + g2.fillOval(Constants.PIECE_MARGIN, Constants.PIECE_MARGIN, this.getWidth() - 2 * Constants.PIECE_MARGIN, this.getHeight() - 2 * Constants.PIECE_MARGIN); } - g2.setColor(c); - g2.fillOval(Constants.PIECE_MARGIN, Constants.PIECE_MARGIN, this.getWidth() - 2 * Constants.PIECE_MARGIN, this.getHeight() - 2 * Constants.PIECE_MARGIN); + else { + g2.setColor(c); + g2.fillOval(Constants.PIECE_MARGIN, Constants.PIECE_MARGIN, this.getWidth() - 2 * Constants.PIECE_MARGIN, this.getHeight() - 2 * Constants.PIECE_MARGIN); + } + } } \ No newline at end of file