Merge branch 'images' into 'master'

Card Renderer: do not display hidden cards

See merge request core-developers/forge!5250
This commit is contained in:
Michael Kamensky
2021-08-23 05:08:35 +00:00
2 changed files with 1 additions and 5 deletions

View File

@@ -243,7 +243,7 @@ public class ImageCache {
// a default "not available" image, however do not add it to the cache, // a default "not available" image, however do not add it to the cache,
// as otherwise it's problematic to update if the real image gets fetched. // as otherwise it's problematic to update if the real image gets fetched.
if (original == null || useArtCrop) { if (original == null || useArtCrop) {
if (ipc != null || cardView != null) { if ((ipc != null || cardView != null) && !originalKey.equals(ImageKeys.getTokenKey(ImageKeys.HIDDEN_CARD))) {
int width = 488, height = 680; int width = 488, height = 680;
BufferedImage art = original; BufferedImage art = original;
CardView card = ipc != null ? Card.getCardForUi(ipc).getView() : cardView; CardView card = ipc != null ? Card.getCardForUi(ipc).getView() : cardView;

View File

@@ -117,7 +117,6 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
static { static {
try { try {
Font roboto = Font.createFont(Font.TRUETYPE_FONT, Paths.get(ForgeConstants.COMMON_FONTS_DIR, "Roboto-Bold.ttf").toFile()); Font roboto = Font.createFont(Font.TRUETYPE_FONT, Paths.get(ForgeConstants.COMMON_FONTS_DIR, "Roboto-Bold.ttf").toFile());
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
@@ -834,7 +833,6 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
} else if (counters > 3) { } else if (counters > 3) {
CardFaceSymbols.drawSymbol("countersMulti", g, cardXOffset - 15, yCounters); CardFaceSymbols.drawSymbol("countersMulti", g, cardXOffset - 15, yCounters);
} }
} }
private void drawMarkersTabs(final Graphics g, List<String> markers) { private void drawMarkersTabs(final Graphics g, List<String> markers) {
@@ -883,7 +881,6 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
nameBounds.width = 43; nameBounds.width = 43;
drawVerticallyCenteredString(g, marker, nameBounds, smallCounterFont, smallFontMetrics); drawVerticallyCenteredString(g, marker, nameBounds, smallCounterFont, smallFontMetrics);
} }
} }
/** /**
@@ -903,7 +900,6 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
g.setFont(font); g.setFont(font);
g.drawString(text, x, y); g.drawString(text, x, y);
g.setFont(oldFont); g.setFont(oldFont);
} }
@Override @Override