mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user