mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
[Mobile] fix black image
This commit is contained in:
@@ -481,10 +481,8 @@ public class CardRenderer {
|
|||||||
drawFoilEffect(g, card, x, y, w, h, false);
|
drawFoilEffect(g, card, x, y, w, h, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!Forge.enableUIMask.equals("Off")) //render this if mask is still loading
|
//if card has invalid or no texture due to sudden changes in ImageCache, draw CardImageRenderer instead and wait for it to refresh automatically
|
||||||
CardImageRenderer.drawCardImage(g, CardView.getCardForUi(pc), false, x, y, w, h, pos);
|
CardImageRenderer.drawCardImage(g, CardView.getCardForUi(pc), false, x, y, w, h, pos);
|
||||||
else //draw cards without textures as just a black rectangle
|
|
||||||
g.fillRect(Color.BLACK, x, y, w, h);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void drawCard(Graphics g, CardView card, float x, float y, float w, float h, CardStackPosition pos, boolean rotate) {
|
public static void drawCard(Graphics g, CardView card, float x, float y, float w, float h, CardStackPosition pos, boolean rotate) {
|
||||||
@@ -545,10 +543,8 @@ public class CardRenderer {
|
|||||||
}
|
}
|
||||||
drawFoilEffect(g, card, x, y, w, h, false);
|
drawFoilEffect(g, card, x, y, w, h, false);
|
||||||
} else {
|
} else {
|
||||||
if (!Forge.enableUIMask.equals("Off")) //render this if mask is still loading
|
//if card has invalid or no texture due to sudden changes in ImageCache, draw CardImageRenderer instead and wait for it to refresh automatically
|
||||||
CardImageRenderer.drawCardImage(g, card, false, x, y, w, h, pos);
|
CardImageRenderer.drawCardImage(g, card, false, x, y, w, h, pos);
|
||||||
else //draw cards without textures as just a black rectangle
|
|
||||||
g.fillRect(Color.BLACK, x, y, w, h);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user