mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
simple manacost display shows split card costs aside
This commit is contained in:
@@ -36,10 +36,12 @@ import javax.swing.border.EtchedBorder;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import forge.Card;
|
||||
import forge.CardCharacteristicName;
|
||||
import forge.CounterType;
|
||||
import forge.GameEntity;
|
||||
import forge.Singletons;
|
||||
import forge.card.CardEdition;
|
||||
import forge.card.CardSplitType;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.gui.toolbox.FLabel;
|
||||
@@ -205,9 +207,11 @@ public class CardDetailPanel extends FPanel {
|
||||
if (card.getManaCost().isNoCost()) {
|
||||
this.nameCostLabel.setText(card.getName());
|
||||
} else {
|
||||
// If you want to make a special view of split cards, keep that special code in this class.
|
||||
// Better if you make several labels that that draw mana symbols
|
||||
this.nameCostLabel.setText(card.getName() + " - " + card.getManaCost());
|
||||
String manaCost = card.getManaCost().toString();
|
||||
if ( card.getRules() != null && card.getRules().getSplitType() == CardSplitType.Split && card.getCurState() == CardCharacteristicName.Original) {
|
||||
manaCost = card.getRules().getMainPart().getManaCost().toString() + " // " + card.getRules().getOtherPart().getManaCost().toString();
|
||||
}
|
||||
this.nameCostLabel.setText(card.getName() + " - " + manaCost);
|
||||
}
|
||||
this.typeLabel.setText(GuiDisplayUtil.formatCardType(card));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user