mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Display PT for nonCreature Vehicles in Mobile where they were previously not visible
This commit is contained in:
@@ -120,7 +120,7 @@ public class CardImageRenderer {
|
|||||||
float typeBoxHeight = 2 * TYPE_FONT.getCapHeight();
|
float typeBoxHeight = 2 * TYPE_FONT.getCapHeight();
|
||||||
float ptBoxHeight = 0;
|
float ptBoxHeight = 0;
|
||||||
float textBoxHeight = h - headerHeight - artHeight - typeBoxHeight - outerBorderThickness - artInset;
|
float textBoxHeight = h - headerHeight - artHeight - typeBoxHeight - outerBorderThickness - artInset;
|
||||||
if (state.isCreature() || state.isPlaneswalker()) {
|
if (state.isCreature() || state.isPlaneswalker() || state.getType().hasSubtype("Vehicle")) {
|
||||||
//if P/T box needed, make room for it
|
//if P/T box needed, make room for it
|
||||||
ptBoxHeight = 2 * PT_FONT.getCapHeight();
|
ptBoxHeight = 2 * PT_FONT.getCapHeight();
|
||||||
textBoxHeight -= ptBoxHeight;
|
textBoxHeight -= ptBoxHeight;
|
||||||
@@ -287,6 +287,14 @@ public class CardImageRenderer {
|
|||||||
else if (state.isPlaneswalker()) {
|
else if (state.isPlaneswalker()) {
|
||||||
pieces.add(String.valueOf(state.getLoyalty()));
|
pieces.add(String.valueOf(state.getLoyalty()));
|
||||||
}
|
}
|
||||||
|
else if (state.getType().hasSubtype("Vehicle")) {
|
||||||
|
// TODO Invert color box for Vehicles?
|
||||||
|
pieces.add("[");
|
||||||
|
pieces.add(String.valueOf(state.getPower()));
|
||||||
|
pieces.add("/");
|
||||||
|
pieces.add(String.valueOf(state.getToughness()));
|
||||||
|
pieces.add("]");
|
||||||
|
}
|
||||||
else { return; }
|
else { return; }
|
||||||
|
|
||||||
float padding = Math.round(PT_FONT.getCapHeight() / 4);
|
float padding = Math.round(PT_FONT.getCapHeight() / 4);
|
||||||
|
|||||||
@@ -244,6 +244,9 @@ public class CardRenderer {
|
|||||||
else if (card.getCurrentState().isPlaneswalker()) {
|
else if (card.getCurrentState().isPlaneswalker()) {
|
||||||
type += " (" + loyalty + ")";
|
type += " (" + loyalty + ")";
|
||||||
}
|
}
|
||||||
|
else if (card.getCurrentState().getType().hasSubtype("Vehicle")) {
|
||||||
|
type += String.format(" [%s / %s]", power, toughness);
|
||||||
|
}
|
||||||
g.drawText(type, typeFont, foreColor, x, y, availableTypeWidth, lineHeight, false, HAlignment.LEFT, true);
|
g.drawText(type, typeFont, foreColor, x, y, availableTypeWidth, lineHeight, false, HAlignment.LEFT, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,6 +427,13 @@ public class CardRenderer {
|
|||||||
pieces.add("/");
|
pieces.add("/");
|
||||||
pieces.add(String.valueOf(details.getToughness()));
|
pieces.add(String.valueOf(details.getToughness()));
|
||||||
}
|
}
|
||||||
|
else if (details.getType().hasSubtype("Vehicle")) {
|
||||||
|
pieces.add("[");
|
||||||
|
pieces.add(String.valueOf(details.getPower()));
|
||||||
|
pieces.add("/");
|
||||||
|
pieces.add(String.valueOf(details.getToughness()));
|
||||||
|
pieces.add("]");
|
||||||
|
}
|
||||||
if (details.isPlaneswalker()) {
|
if (details.isPlaneswalker()) {
|
||||||
if (pieces.isEmpty()) {
|
if (pieces.isEmpty()) {
|
||||||
pieces.add(String.valueOf(details.getLoyalty()));
|
pieces.add(String.valueOf(details.getLoyalty()));
|
||||||
@@ -432,6 +442,7 @@ public class CardRenderer {
|
|||||||
pieces.add("(" + details.getLoyalty() + ")");
|
pieces.add("(" + details.getLoyalty() + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pieces.isEmpty()) { return; }
|
if (pieces.isEmpty()) { return; }
|
||||||
|
|
||||||
FSkinFont font = FSkinFont.forHeight(h * 0.15f);
|
FSkinFont font = FSkinFont.forHeight(h * 0.15f);
|
||||||
|
|||||||
Reference in New Issue
Block a user