mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
Refactor: removed outdated code for non implemented cards
This commit is contained in:
parent
a464333761
commit
38a45c2e8e
5 changed files with 5 additions and 20 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue