Reduced hand cards size. Removed battlefield card area gap (cards now have more place and are less reduced in size).

This commit is contained in:
magenoxx 2011-01-29 20:03:22 +03:00
parent 93878d4868
commit 2abc0e888d
15 changed files with 81 additions and 36 deletions

View file

@ -67,6 +67,7 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener
protected BigCard bigCard;
protected UUID gameId;
private Map<UUID, MageCard> cards = new HashMap<UUID, MageCard>();
private Dimension cardDimension;
public CardGrid() {
initComponents();
@ -93,7 +94,10 @@ public class CardGrid extends javax.swing.JLayeredPane implements MouseListener
}
private void addCard(CardView card, BigCard bigCard, UUID gameId) {
MageCard cardImg = Plugins.getInstance().getMageCard(card, bigCard, Config.dimensions, gameId, true);
if (cardDimension == null) {
cardDimension = new Dimension(Config.dimensions.frameWidth, Config.dimensions.frameHeight);
}
MageCard cardImg = Plugins.getInstance().getMageCard(card, bigCard, cardDimension, gameId, true);
cards.put(card.getId(), cardImg);
cardImg.addMouseListener(this);
add(cardImg);