mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Draw effects with orange border to make them easier to distinguish from normal cards.
This commit is contained in:
@@ -290,11 +290,20 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
|
|||||||
|
|
||||||
// White border if card is known to have it.
|
// White border if card is known to have it.
|
||||||
if (getCard() != null && MatchUtil.canCardBeShown(getCard())) {
|
if (getCard() != null && MatchUtil.canCardBeShown(getCard())) {
|
||||||
CardStateView state = getCard().getCurrentState();
|
final CardStateView state = getCard().getCurrentState();
|
||||||
CardEdition ed = FModel.getMagicDb().getEditions().get(state.getSetCode());
|
final CardEdition ed = FModel.getMagicDb().getEditions().get(state.getSetCode());
|
||||||
if (ed != null && ed.isWhiteBorder() && state.getFoilIndex() == 0) {
|
boolean colorIsSet = false;
|
||||||
g2d.setColor(Color.white);
|
if (state.getType().hasStringType("Effect")) {
|
||||||
int ins = 1;
|
// Effects are drawn with orange border
|
||||||
|
g2d.setColor(Color.ORANGE);
|
||||||
|
colorIsSet = true;
|
||||||
|
} else if (ed != null && ed.isWhiteBorder() && state.getFoilIndex() == 0) {
|
||||||
|
// Non-foil cards from white-bordered sets are drawn with white border
|
||||||
|
g2d.setColor(Color.WHITE);
|
||||||
|
colorIsSet = true;
|
||||||
|
}
|
||||||
|
if (colorIsSet) {
|
||||||
|
final int ins = 1;
|
||||||
g2d.fillRoundRect(cardXOffset + ins, cardYOffset + ins, cardWidth - ins*2, cardHeight - ins*2, cornerSize-ins, cornerSize-ins);
|
g2d.fillRoundRect(cardXOffset + ins, cardYOffset + ins, cardWidth - ins*2, cardHeight - ins*2, cornerSize-ins, cornerSize-ins);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user