mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Not displaying tapped for combat dialog.
This commit is contained in:
parent
d6dd2a22cc
commit
aea2fc2fcf
4 changed files with 20 additions and 5 deletions
|
|
@ -48,6 +48,7 @@ import mage.client.plugins.impl.Plugins;
|
|||
import mage.client.util.Config;
|
||||
import mage.view.CardView;
|
||||
import mage.view.CardsView;
|
||||
import mage.view.PermanentView;
|
||||
import mage.view.StackAbilityView;
|
||||
|
||||
/**
|
||||
|
|
@ -57,8 +58,9 @@ import mage.view.StackAbilityView;
|
|||
public class Cards extends javax.swing.JPanel {
|
||||
|
||||
private Map<UUID, MageCard> cards = new LinkedHashMap<UUID, MageCard>();
|
||||
|
||||
/** Creates new form Cards */
|
||||
private boolean dontDisplayTapped = false;
|
||||
|
||||
/** Creates new form Cards */
|
||||
public Cards() {
|
||||
initComponents();
|
||||
setOpaque(false);
|
||||
|
|
@ -83,6 +85,11 @@ public class Cards extends javax.swing.JPanel {
|
|||
}
|
||||
|
||||
for (CardView card: cardsView.values()) {
|
||||
if (dontDisplayTapped) {
|
||||
if (card instanceof PermanentView) {
|
||||
((PermanentView)card).overrideTapped(false);
|
||||
}
|
||||
}
|
||||
if (card instanceof StackAbilityView) {
|
||||
CardView tmp = ((StackAbilityView)card).getSourceCard();
|
||||
tmp.overrideRules(card.getRules());
|
||||
|
|
@ -168,4 +175,7 @@ public class Cards extends javax.swing.JPanel {
|
|||
private javax.swing.JScrollPane jScrollPane1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
public void setDontDisplayTapped(boolean dontDisplayTapped) {
|
||||
this.dontDisplayTapped = dontDisplayTapped;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@
|
|||
|
||||
package mage.client.game;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.client.cards.BigCard;
|
||||
import mage.client.util.Config;
|
||||
import mage.view.CombatGroupView;
|
||||
|
|
@ -52,6 +52,7 @@ public class CombatGroup extends javax.swing.JPanel {
|
|||
/** Creates new form CombatGroup */
|
||||
public CombatGroup() {
|
||||
initComponents();
|
||||
attackers.setDontDisplayTapped(true);
|
||||
}
|
||||
|
||||
public void init(UUID gameId, BigCard bigCard) {
|
||||
|
|
|
|||
|
|
@ -193,11 +193,11 @@ public class GamePanel extends javax.swing.JPanel {
|
|||
}
|
||||
|
||||
public synchronized void init(GameView game) {
|
||||
logger.log(Level.FINE, "init.");
|
||||
logger.warning("init.");
|
||||
MageFrame.getCombatDialog().init(gameId, bigCard);
|
||||
MageFrame.getCombatDialog().setLocation(500, 300);
|
||||
addPlayers(game);
|
||||
logger.log(Level.FINE, "added players.");
|
||||
logger.warning("added players.");
|
||||
updateGame(game);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue