mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-11 16:26:22 +00:00
update remaining checks
This commit is contained in:
@@ -34,21 +34,22 @@ public class CardImage implements FImage {
|
||||
|
||||
@Override
|
||||
public void draw(Graphics g, float x, float y, float w, float h) {
|
||||
CardView cv = CardView.getCardForUi(card);
|
||||
if (image == null) { //attempt to retrieve card image if needed
|
||||
image = ImageCache.getInstance().getImage(card);
|
||||
if (image == null) {
|
||||
if (!Forge.enableUIMask.equals("Off")) //render this if mask is still loading
|
||||
CardImageRenderer.drawCardImage(g, CardView.getCardForUi(card), false, x, y, w, h, CardStackPosition.Top, Forge.enableUIMask.equals("Art"), true);
|
||||
CardImageRenderer.drawCardImage(g, cv, false, x, y, w, h, CardStackPosition.Top, Forge.enableUIMask.equals("Art"), true);
|
||||
|
||||
return; //can't draw anything if can't be loaded yet
|
||||
}
|
||||
}
|
||||
|
||||
if (image == ImageCache.getInstance().getDefaultImage() || Forge.enableUIMask.equals("Art")) {
|
||||
CardImageRenderer.drawCardImage(g, CardView.getCardForUi(card), false, x, y, w, h, CardStackPosition.Top, true, true);
|
||||
CardImageRenderer.drawCardImage(g, cv, false, x, y, w, h, CardStackPosition.Top, true, true);
|
||||
} else {
|
||||
if (Forge.enableUIMask.equals("Full")) {
|
||||
if (image.toString().contains(".fullborder."))
|
||||
if (cv.isFullBorder(image.toString()))
|
||||
g.drawCardRoundRect(image, null, x, y, w, h, false, false);
|
||||
else {
|
||||
float radius = (h - w) / 8;
|
||||
|
||||
@@ -814,7 +814,7 @@ public class CardImageRenderer {
|
||||
}
|
||||
if (rotatePlane && (card.getCurrentState().isPhenomenon() || card.getCurrentState().isPlane() || (card.getCurrentState().isBattle() && !altState) || (card.getAlternateState() != null && card.getAlternateState().isBattle() && altState))) {
|
||||
if (Forge.enableUIMask.equals("Full")) {
|
||||
if (image.toString().contains(".fullborder."))
|
||||
if (card.isFullBorder(image.toString()))
|
||||
g.drawCardRoundRect(image, new_x, new_y, new_w, new_h, new_x + new_w / 2, new_y + new_h / 2, -90);
|
||||
else {
|
||||
g.drawRotatedImage(FSkin.getBorders().get(0), new_x, new_y, new_w, new_h, new_x + new_w / 2, new_y + new_h / 2, -90);
|
||||
@@ -827,7 +827,7 @@ public class CardImageRenderer {
|
||||
} else if (rotateSplit && isCurrentCard && card.isSplitCard() && canshow && !card.isFaceDown()) {
|
||||
boolean isAftermath = card.getText().contains("Aftermath") || card.getAlternateState().getOracleText().contains("Aftermath");
|
||||
if (Forge.enableUIMask.equals("Full")) {
|
||||
if (image.toString().contains(".fullborder."))
|
||||
if (card.isFullBorder(image.toString()))
|
||||
g.drawCardRoundRect(image, new_x, new_y, new_w, new_h, new_x + new_w / 2, new_y + new_h / 2, isAftermath ? 90 : -90);
|
||||
else {
|
||||
g.drawRotatedImage(FSkin.getBorders().get(ImageCache.getInstance().getFSkinBorders(card)), new_x, new_y, new_w, new_h, new_x + new_w / 2, new_y + new_h / 2, isAftermath ? 90 : -90);
|
||||
@@ -843,7 +843,7 @@ public class CardImageRenderer {
|
||||
if (card.isSplitCard() && rotateSplit && isCurrentCard) {
|
||||
boolean isAftermath = card.getText().contains("Aftermath") || card.getAlternateState().getOracleText().contains("Aftermath");
|
||||
if (Forge.enableUIMask.equals("Full")) {
|
||||
if (image.toString().contains(".fullborder."))
|
||||
if (card.isFullBorder(image.toString()))
|
||||
g.drawCardRoundRect(image, new_x, new_y, new_w, new_h, new_x + new_w / 2, new_y + new_h / 2, isAftermath ? 90 : -90);
|
||||
else {
|
||||
g.drawRotatedImage(FSkin.getBorders().get(ImageCache.getInstance().getFSkinBorders(card)), new_x, new_y, new_w, new_h, new_x + new_w / 2, new_y + new_h / 2, isAftermath ? 90 : -90);
|
||||
@@ -855,7 +855,7 @@ public class CardImageRenderer {
|
||||
g.drawRotatedImage(image, new_x, new_y, new_w, new_h, new_x + new_w / 2, new_y + new_h / 2, isAftermath ? 90 : -90);
|
||||
} else {
|
||||
if (Forge.enableUIMask.equals("Full")) {
|
||||
if (image.toString().contains(".fullborder."))
|
||||
if (card.isFullBorder(image.toString()))
|
||||
g.drawCardRoundRect(image, null, x, y, w, h, false, false);
|
||||
else {
|
||||
g.drawImage(ImageCache.getInstance().getBorderImage(image.toString()), ImageCache.getInstance().borderColor(image), x, y, w, h);
|
||||
@@ -872,7 +872,7 @@ public class CardImageRenderer {
|
||||
g.drawImage(sleeves, x, y, w, h);
|
||||
}
|
||||
} else if (Forge.enableUIMask.equals("Full") && canshow) {
|
||||
if (image.toString().contains(".fullborder."))
|
||||
if (card.isFullBorder(image.toString()))
|
||||
g.drawCardRoundRect(image, null, x, y, w, h, false, false);
|
||||
else {
|
||||
g.drawImage(ImageCache.getInstance().getBorderImage(image.toString()), ImageCache.getInstance().borderColor(image), x, y, w, h);
|
||||
|
||||
Reference in New Issue
Block a user