- Reverting the last attempt at fixing the morph color leak, the idea didn't work out, resorting to the hackier but working fix for now.

This commit is contained in:
Agetian
2015-05-17 07:42:42 +00:00
parent 39d9e91430
commit 56cc9b7b25
2 changed files with 9 additions and 6 deletions

View File

@@ -34,6 +34,7 @@ import forge.card.CardDetailUtil;
import forge.card.CardDetailUtil.DetailColors;
import forge.card.CardEdition;
import forge.card.CardRarity;
import forge.card.CardStateName;
import forge.game.GameView;
import forge.game.card.Card;
import forge.game.card.CardView;
@@ -172,10 +173,6 @@ public class CardDetailPanel extends SkinnedPanel {
}
public final void setCard(final CardView card, final boolean isInAltState) {
setCard(card, false, true);
}
public final void setCard(final CardView card, final boolean isInAltState, final boolean canShow) {
nameCostLabel.setText("");
typeLabel.setVisible(true);
typeLabel.setText("");
@@ -199,6 +196,8 @@ public class CardDetailPanel extends SkinnedPanel {
return;
}
boolean canShow = true;
if (state.getManaCost().isNoCost() || !canShow) {
nameCostLabel.setText(CardDetailUtil.formatCardName(card, canShow, isInAltState));
}
@@ -263,7 +262,11 @@ public class CardDetailPanel extends SkinnedPanel {
setInfoLabel.setBorder(BorderFactory.createLineBorder(foreColor));
}
updateBorder(state, canShow);
if (state.getState() == CardStateName.FaceDown) {
updateBorder(state, false); // do not spoil the color of face-down cards
} else {
updateBorder(state, canShow);
}
powerToughnessLabel.setText(CardDetailUtil.formatPowerToughness(state, canShow));

View File

@@ -58,7 +58,7 @@ public class CDetail implements ICDoc {
void showCard(final CardView c, final boolean isInAltState, final boolean mayView, final boolean mayFlip) {
final CardView toShow = mayView ? c : null;
view.getLblFlipcard().setVisible(toShow != null && mayFlip);
view.getPnlDetail().setCard(toShow, isInAltState, mayView);
view.getPnlDetail().setCard(toShow, isInAltState);
if (view.getParentCell() != null) {
view.getParentCell().repaintSelf();
}