mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Vehicle P/T Rendering Enhancement
* Non-animated vehicle permanents have their P/T dimmed to distinugish their status past the type line changes.
This commit is contained in:
parent
3fb5a60202
commit
24beaa08f9
1 changed files with 15 additions and 1 deletions
|
@ -22,10 +22,12 @@ import java.text.CharacterIterator;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import mage.ObjectColor;
|
||||
import mage.cards.FrameStyle;
|
||||
import mage.client.cards.Permanent;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
import mage.constants.CardType;
|
||||
import mage.view.CardView;
|
||||
|
@ -627,7 +629,19 @@ public class ModernCardRenderer extends CardRenderer {
|
|||
partWidth - 2 * contentInset, 1);
|
||||
|
||||
// Draw text
|
||||
g.setColor(isVehicle ? Color.white : getBoxTextColor());
|
||||
Color textColor;
|
||||
if (isVehicle) {
|
||||
boolean isAnimated = !(cardView instanceof PermanentView) || cardView.getCardTypes().contains(CardType.CREATURE);
|
||||
if (isAnimated) {
|
||||
textColor = Color.white;
|
||||
} else {
|
||||
textColor = new Color(180, 180, 180);
|
||||
}
|
||||
|
||||
} else {
|
||||
textColor = getBoxTextColor();
|
||||
}
|
||||
g.setColor(textColor);
|
||||
g.setFont(ptTextFont);
|
||||
String ptText = cardView.getPower() + "/" + cardView.getToughness();
|
||||
int ptTextWidth = g.getFontMetrics().stringWidth(ptText);
|
||||
|
|
Loading…
Reference in a new issue