forked from External/mage
* UI: improved cards appearance:
* added colorized PT values (boosted is green, unboosted is red); * added toughness with damage calcs (damaged is red); * image render: now title and PT texts are readable/big in small cards; * mtgo render: improved image quality (less pixelated now); * mtgo render: improved PT font (bold now);
This commit is contained in:
parent
060766bb0a
commit
5c48803ef9
9 changed files with 268 additions and 89 deletions
|
|
@ -181,10 +181,14 @@ public final class GuiDisplayUtil {
|
|||
|
||||
public static TextLines getTextLinesfromCardView(CardView card) {
|
||||
TextLines textLines = new TextLines();
|
||||
|
||||
// rules
|
||||
textLines.setLines(new ArrayList<>(card.getRules()));
|
||||
for (String rule : card.getRules()) {
|
||||
textLines.setBasicTextLength(textLines.getBasicTextLength() + rule.length());
|
||||
}
|
||||
|
||||
// counters
|
||||
if (card.getMageObjectType().canHaveCounters()) {
|
||||
ArrayList<CounterView> counters = new ArrayList<>();
|
||||
if (card instanceof PermanentView) {
|
||||
|
|
@ -212,10 +216,12 @@ public final class GuiDisplayUtil {
|
|||
textLines.setBasicTextLength(textLines.getBasicTextLength() + 50);
|
||||
}
|
||||
}
|
||||
|
||||
// damage
|
||||
if (card.getMageObjectType().isPermanent() && card instanceof PermanentView) {
|
||||
int damage = ((PermanentView) card).getDamage();
|
||||
if (damage > 0) {
|
||||
textLines.getLines().add("<span color='red'><b>Damage dealt:</b> " + damage + "</span>");
|
||||
textLines.getLines().add("<span color='red'><b>Damage dealt:</b> " + damage + "</span>"); // TODO
|
||||
textLines.setBasicTextLength(textLines.getBasicTextLength() + 50);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue