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