papercard images as fallback

This commit is contained in:
Anthony Calosa
2023-03-15 01:06:29 +08:00
parent eac869f389
commit b88cd6c2e9
2 changed files with 2 additions and 2 deletions

View File

@@ -155,7 +155,7 @@ public class GuiDesktop implements IGuiBase {
if (paperCard != null)
cardImage = ImageCache.scaleImage(paperCard.getCardImageKey(), cardImageWidth, cardImageHeight, false, null);
if (FileUtil.doesFileExist(overlayFilename) && cardImage == null) {
if (FileUtil.doesFileExist(overlayFilename)) {
final ImageIcon overlay = new ImageIcon(overlayFilename);
g.drawImage(overlay.getImage(), (background.getWidth() - overlay.getIconWidth()) / 2, (background.getHeight() - overlay.getIconHeight()) / 2, overlay.getIconWidth(), overlay.getIconHeight(), null);
} else if (cardImage != null) {

View File

@@ -134,7 +134,7 @@ public class GuiMobile implements IGuiBase {
if (paperCard != null)
cardImage = ImageCache.getImage(paperCard.getCardImageKey(), false);
if (FileUtil.doesFileExist(overlayFilename) && cardImage == null) {
if (FileUtil.doesFileExist(overlayFilename)) {
try {
final Texture overlay = Forge.getAssets().getTexture(Gdx.files.absolute(overlayFilename));
g.drawImage(overlay, (background.getWidth() - overlay.getWidth()) / 2, (background.getHeight() - overlay.getHeight()) / 2, overlay.getWidth(), overlay.getHeight());