diff --git a/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java b/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java index aa1cce0b27..76a8886767 100644 --- a/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java +++ b/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java @@ -221,7 +221,7 @@ public final class GuiDisplayUtil { if (card.getMageObjectType().isPermanent() && card instanceof PermanentView) { int damage = ((PermanentView) card).getDamage(); if (damage > 0) { - textLines.getLines().add("Damage dealt: " + damage + ""); // TODO + textLines.getLines().add("Damage dealt: " + damage + ""); textLines.setBasicTextLength(textLines.getBasicTextLength() + 50); } } diff --git a/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java b/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java index 3bbcb3fc05..459c501766 100644 --- a/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java +++ b/Mage.Client/src/main/java/org/mage/card/arcane/ModernCardRenderer.java @@ -990,6 +990,18 @@ public class ModernCardRenderer extends CardRenderer { // Is it a creature? boolean isVehicle = cardView.getSubTypes().contains(SubType.VEHICLE); if (cardView.isCreature() || isVehicle) { + + // draws p/t by parts + String ptText1 = cardView.getPower(); + String ptText2 = "/"; + String ptText3 = CardRendererUtils.getCardLifeWithDamage(cardView); + int ptTextWidth1 = g.getFontMetrics(ptTextFont).stringWidth(ptText1); + int ptTextWidth2 = g.getFontMetrics(ptTextFont).stringWidth(ptText2); + + // PT max size + int partMinWidth = g.getFontMetrics(ptTextFont).stringWidth(ptText1 + ptText2 + ptText3) + 2 * contentInset; + partWidth = Math.max(partMinWidth, partWidth); + int x = cardWidth - borderWidth - partWidth; // Draw PT box @@ -1024,14 +1036,6 @@ public class ModernCardRenderer extends CardRenderer { g.setColor(defaultTextColor); g.setFont(ptTextFont); - // draws p/t by parts - String ptText1 = cardView.getPower(); - String ptText2 = "/"; - String ptText3 = CardRendererUtils.getCardLifeWithDamage(cardView); - - int ptTextWidth1 = g.getFontMetrics().stringWidth(ptText1); - int ptTextWidth2 = g.getFontMetrics().stringWidth(ptText2); - // draws / by center, P and T from left/right sides of / int ptCenterX = x + partWidth / 2; // p