mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
CloneRewrite
This commit is contained in:
@@ -85,7 +85,7 @@ public class CardImageRenderer {
|
||||
|
||||
//determine colors for borders
|
||||
final List<DetailColors> borderColors;
|
||||
final boolean isFaceDown = card.getCurrentState().getState() == CardStateName.FaceDown;
|
||||
final boolean isFaceDown = card.isFaceDown();
|
||||
if (isFaceDown) {
|
||||
borderColors = ImmutableList.of(DetailColors.FACE_DOWN);
|
||||
}
|
||||
@@ -371,7 +371,7 @@ public class CardImageRenderer {
|
||||
|
||||
//determine colors for borders
|
||||
final List<DetailColors> borderColors;
|
||||
final boolean isFaceDown = card.getCurrentState().getState() == CardStateName.FaceDown;
|
||||
final boolean isFaceDown = card.isFaceDown();
|
||||
if (isFaceDown) {
|
||||
borderColors = ImmutableList.of(DetailColors.FACE_DOWN);
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ public class CardRenderer {
|
||||
return cardArt;
|
||||
}
|
||||
|
||||
public static FImageComplex getAftermathSecondCardArt(String imageKey) {
|
||||
public static FImageComplex getAftermathSecondCardArt(final String imageKey) {
|
||||
FImageComplex cardArt = cardArtCache.get("Aftermath_second_"+imageKey);
|
||||
if (cardArt == null) {
|
||||
Texture image = new CachedCardImage(imageKey) {
|
||||
@@ -439,7 +439,7 @@ public class CardRenderer {
|
||||
|
||||
// TODO: A hacky workaround is currently used to make the game not leak the color information for Morph cards.
|
||||
final CardStateView details = card.getCurrentState();
|
||||
final boolean isFaceDown = details.getState() == CardStateName.FaceDown;
|
||||
final boolean isFaceDown = card.isFaceDown();
|
||||
final DetailColors borderColor = isFaceDown ? CardDetailUtil.DetailColors.FACE_DOWN : CardDetailUtil.getBorderColor(details, canShow); // canShow doesn't work here for face down Morphs
|
||||
Color color = FSkinColor.fromRGB(borderColor.r, borderColor.g, borderColor.b);
|
||||
color = FSkinColor.tintColor(Color.WHITE, color, CardRenderer.PT_BOX_TINT);
|
||||
|
||||
@@ -242,8 +242,7 @@ public class VStack extends FDropDown {
|
||||
}
|
||||
|
||||
// TODO: A hacky workaround is currently used to make the game not leak the color information for Morph cards.
|
||||
final CardStateView curState = card.getCurrentState();
|
||||
final boolean isFaceDown = curState.getState() == CardStateName.FaceDown;
|
||||
final boolean isFaceDown = card.isFaceDown();
|
||||
final DetailColors color = isFaceDown ? CardDetailUtil.DetailColors.FACE_DOWN : CardDetailUtil.getBorderColor(card.getCurrentState(), true); // otherwise doesn't work correctly for face down Morphs
|
||||
backColor = FSkinColor.fromRGB(color.r, color.g, color.b);
|
||||
foreColor = FSkinColor.getHighContrastColor(backColor);
|
||||
|
||||
Reference in New Issue
Block a user