mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Temporary crash prevention measure for manifested split cards (until the problem with the view of such cards can be figured out)
This commit is contained in:
@@ -372,6 +372,7 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
|
||||
if (!showSplitMana) {
|
||||
drawManaCost(g, card.getCurrentState().getManaCost(), 0);
|
||||
} else {
|
||||
if (!card.getName().isEmpty()) { // FIXME: temporary crash prevention measure for face-down (manifested) split cards
|
||||
PaperCard pc = StaticData.instance().getCommonCards().getCard(card.getName());
|
||||
int ofs = pc != null && Card.getCardForUi(pc).hasKeyword("Aftermath") ? -12 : 12;
|
||||
|
||||
@@ -379,6 +380,7 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
|
||||
drawManaCost(g, card.getAlternateState().getManaCost(), -ofs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int number = 0;
|
||||
if (card.getCounters() != null) {
|
||||
|
||||
@@ -379,6 +379,7 @@ public class CardRenderer {
|
||||
if (showCardManaCostOverlay(card)) {
|
||||
float manaSymbolSize = w / 4;
|
||||
if (card.isSplitCard() && card.hasAlternateState()) {
|
||||
if (!card.getName().isEmpty()) { // FIXME: temporary crash prevention measure for face-down (manifested) split cards
|
||||
float dy = manaSymbolSize / 2 + Utils.scale(5);
|
||||
|
||||
PaperCard pc = StaticData.instance().getCommonCards().getCard(card.getName());
|
||||
@@ -389,6 +390,7 @@ public class CardRenderer {
|
||||
drawManaCost(g, card.getAlternateState().getManaCost(), x - padding, y - dy, w + 2 * padding, h, manaSymbolSize);
|
||||
drawManaCost(g, card.getCurrentState().getManaCost(), x - padding, y + dy, w + 2 * padding, h, manaSymbolSize);
|
||||
}
|
||||
}
|
||||
else {
|
||||
drawManaCost(g, card.getCurrentState().getManaCost(), x - padding, y, w + 2 * padding, h, manaSymbolSize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user