mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-12 08:48:39 +00:00
papercard images as fallback
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user