Added background color to hand area.

This commit is contained in:
magenoxx 2011-06-08 19:03:22 +04:00
parent b04f843f40
commit e0d1ab226f
2 changed files with 12 additions and 3 deletions

View file

@ -34,8 +34,7 @@
package mage.client.cards;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.*;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
@ -85,6 +84,15 @@ public class Cards extends javax.swing.JPanel {
}
}
/**
* Sets components background color
* @param color
*/
public void setBackgroundColor(Color color) {
cardArea.setOpaque(true);
cardArea.setBackground(new Color(0,0,0,100));
}
public void setBorder(Border border) {
super.setBorder(border);
if (jScrollPane1 != null) {
@ -168,7 +176,7 @@ public class Cards extends javax.swing.JPanel {
private void layoutCards(Dimension dimension) {
if (Plugins.getInstance().isCardPluginLoaded()) {
int dx = 0;
int dx = GAP_X;
for (MageCard card: cards.values()) {
card.setLocation(dx, 0);
card.setCardBounds(dx, 0, dimension.width, dimension.height);

View file

@ -89,6 +89,7 @@ public class GamePanel extends javax.swing.JPanel {
initComponents();
hand.setHScrollSpeed(8);
hand.setBackgroundColor(new Color(0,0,0,100));
combat = new CombatDialog();
pickNumber = new PickNumberDialog();
MageFrame.getDesktop().add(combat, JLayeredPane.POPUP_LAYER);