Refactor: removed outdated code for non implemented cards

This commit is contained in:
Oleg Agafonov 2018-09-09 16:06:40 +04:00
parent a464333761
commit 38a45c2e8e
5 changed files with 5 additions and 20 deletions

View file

@ -398,18 +398,6 @@ public class MageBook extends JComponent {
cardImg.setCardCaptionTopOffset(8); // card caption below real card caption to see full name even with mana icons
boolean implemented = card.getRarity() != Rarity.NA;
// implemented label
// old code, nowadays app load only implemented cards (JayDi85, 23.11.2017)
/*
GlowText label = new GlowText();
label.setGlow(implemented ? Color.green : NOT_IMPLEMENTED, 12, 0.0f);
label.setText(implemented ? "Implemented" : "Not implemented");
int dx = implemented ? 15 : 5;
label.setBounds(rectangle.x + dx, rectangle.y + cardDimensions.frameHeight + 7, 110, 30);
jLayeredPane.add(label);
*/
// card number label
JLabel cardNumber = new JLabel();
int dy = -5; // image panel have empty space in bottom (bug?), need to move label up

View file

@ -121,16 +121,14 @@ public class CardPluginImpl implements CardPlugin {
@Override
public MagePermanent getMagePermanent(PermanentView permanent, Dimension dimension, UUID gameId, ActionCallback callback, boolean canBeFoil, boolean loadImage) {
CardPanel cardPanel = makePanel(permanent, gameId, loadImage, callback, false, dimension);
boolean implemented = permanent.getRarity() != Rarity.NA;
cardPanel.setShowCastingCost(implemented);
cardPanel.setShowCastingCost(true);
return cardPanel;
}
@Override
public MagePermanent getMageCard(CardView cardView, Dimension dimension, UUID gameId, ActionCallback callback, boolean canBeFoil, boolean loadImage) {
CardPanel cardPanel = makePanel(cardView, gameId, loadImage, callback, false, dimension);
boolean implemented = cardView.getRarity() != null && cardView.getRarity() != Rarity.NA;
cardPanel.setShowCastingCost(implemented);
cardPanel.setShowCastingCost(true);
return cardPanel;
}