mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
gui: fixed token render in mtgo mode (part of #11873)
This commit is contained in:
parent
68bfe4fd6f
commit
2aea44da2c
4 changed files with 9 additions and 13 deletions
|
|
@ -237,7 +237,7 @@ public abstract class CardRenderer {
|
|||
// Template methods that are possible to override, but unlikely to be
|
||||
// overridden.
|
||||
// Draw the card back
|
||||
protected void drawCardBack(Graphics2D g) {
|
||||
protected void drawCardBackTexture(Graphics2D g) {
|
||||
g.setPaint(BG_TEXTURE_CARDBACK);
|
||||
g.fillRect(borderWidth, borderWidth,
|
||||
cardWidth - 2 * borderWidth, cardHeight - 2 * borderWidth);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import mage.client.dialog.PreferencesDialog;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.MageObjectType;
|
||||
import mage.constants.SubType;
|
||||
import mage.util.CardUtil;
|
||||
import mage.util.SubTypes;
|
||||
import mage.view.CardView;
|
||||
import mage.view.PermanentView;
|
||||
|
|
@ -264,11 +263,9 @@ public class ModernCardRenderer extends CardRenderer {
|
|||
@Override
|
||||
protected void drawBackground(Graphics2D g) {
|
||||
// Draw background, in 3 parts
|
||||
|
||||
if (false && cardView.isFaceDown()) {
|
||||
// TODO: delete un-used code?!
|
||||
// Just draw a brown rectangle
|
||||
drawCardBack(g);
|
||||
if (cardView.isFaceDown()) {
|
||||
// just draw a brown rectangle
|
||||
drawCardBackTexture(g);
|
||||
} else {
|
||||
if (cardView.getFrameStyle() == FrameStyle.UST_FULL_ART_BASIC) {
|
||||
return;
|
||||
|
|
@ -278,7 +275,7 @@ public class ModernCardRenderer extends CardRenderer {
|
|||
if (cardView.getExpansionSetCode().equals("EXP")) {
|
||||
isExped = true;
|
||||
}
|
||||
BufferedImage bg = getBackgroundImage(cardView.getColor(), cardView.getCardTypes(), cardView.getSubTypes(), isExped);
|
||||
BufferedImage bg = getBackgroundTexture(cardView.getColor(), cardView.getCardTypes(), cardView.getSubTypes(), isExped);
|
||||
if (bg == null) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1542,7 +1539,7 @@ public class ModernCardRenderer extends CardRenderer {
|
|||
|
||||
// Determine which background image to use from a set of colors
|
||||
// and the current card.
|
||||
protected static BufferedImage getBackgroundImage(ObjectColor colors, Collection<CardType> types, SubTypes subTypes, boolean isExped) {
|
||||
protected static BufferedImage getBackgroundTexture(ObjectColor colors, Collection<CardType> types, SubTypes subTypes, boolean isExped) {
|
||||
if (subTypes.contains(SubType.VEHICLE)) {
|
||||
return BG_IMG_VEHICLE;
|
||||
} else if (types.contains(CardType.LAND)) {
|
||||
|
|
|
|||
|
|
@ -157,9 +157,8 @@ public class ModernSplitCardRenderer extends ModernCardRenderer {
|
|||
|
||||
@Override
|
||||
protected void drawBackground(Graphics2D g) {
|
||||
if (false && cardView.isFaceDown()) {
|
||||
// TODO: delete un-used code?!
|
||||
drawCardBack(g);
|
||||
if (cardView.isFaceDown()) {
|
||||
drawCardBackTexture(g);
|
||||
} if (isAdventure()) {
|
||||
super.drawBackground(g);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue