* Improved handling of enlarged images. Added mode to show other side of flip and transform cards. Added icon for copied cards and possibility to show enlarged original or copied card.

This commit is contained in:
LevelX2 2014-03-06 21:51:51 +01:00
parent 0babf49392
commit 59d907c981
24 changed files with 490 additions and 233 deletions

View file

@ -43,13 +43,14 @@ public class PermanentView extends CardView {
private static final long serialVersionUID = 1L;
private boolean tapped;
private boolean flipped;
private boolean phasedIn;
private boolean faceUp;
private boolean summoningSickness;
private int damage;
private final boolean flipped;
private final boolean phasedIn;
private final boolean faceUp;
private final boolean summoningSickness;
private final int damage;
private List<UUID> attachments;
private CardView original;
private final CardView original;
private final boolean copy;
public PermanentView(Permanent permanent, Card card) {
super(permanent);
@ -61,7 +62,7 @@ public class PermanentView extends CardView {
this.summoningSickness = permanent.hasSummoningSickness();
this.damage = permanent.getDamage();
if (permanent.getAttachments().size() > 0) {
attachments = new ArrayList<UUID>();
attachments = new ArrayList<>();
attachments.addAll(permanent.getAttachments());
}
if (isToken()) {
@ -77,6 +78,19 @@ public class PermanentView extends CardView {
}
}
this.transformed = permanent.isTransformed();
this.copy = permanent.isCopy();
// for fipped, transformed or copied cards, switch the names
if (!original.getName().equals(this.getName())) {
if (permanent.isCopy() && permanent.isFlipCard()) {
this.alternateName = permanent.getFlipCardName();
this.originalName = this.getName();
} else {
this.alternateName = original.getName();
this.originalName = this.getName();
}
}
}
public boolean isTapped() {
@ -91,6 +105,10 @@ public class PermanentView extends CardView {
return flipped;
}
public boolean isCopy() {
return copy;
}
public boolean isPhasedIn() {
return phasedIn;
}