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,
// as otherwise it's problematic to update if the real image gets fetched.
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;
BufferedImage art = original;
CardView card = ipc != null ? Card.getCardForUi(ipc).getView() : cardView;

View File

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