Improved overlay effect to display "disabled" cards

The "disabled" card effect will be used in Deck Import to show the preview of those cards that won't be imported in the deck. The new improved overlay effect has been achieved by adding a grey colour to image with alpha.

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This commit is contained in:
leriomaggio
2021-09-30 07:02:50 +01:00
parent 7be8c1bf2a
commit 1a8347805c

View File

@@ -252,8 +252,10 @@ public class FImagePanel extends JPanel {
private void doPerformancePaint(Graphics g) {
Graphics2D g2d = (Graphics2D)g;
setRenderingHints(g2d);
if (alpha > 0)
if (alpha > 0) {
g2d.setColor(new Color(92, 92, 92));
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha));
}
g2d.drawImage(sourceImage, getAffineTransform(sourceImage, true), null);
}