mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Fixed morphed card text not showing up in details panel with Lens of Clarity on the battlefield. Added reminder to the details panel that morphed cards can be looked at when you control a Lens of Clarity.
This commit is contained in:
@@ -97,28 +97,28 @@ public class CardDetailPanel extends SkinnedPanel {
|
||||
|
||||
@Override
|
||||
public void doLayout() {
|
||||
int insets = 3;
|
||||
int setInfoWidth = 40;
|
||||
int x = insets;
|
||||
int y = insets;
|
||||
int lineWidth = getWidth() - 2 * insets;
|
||||
int lineHeight = this.nameCostLabel.getPreferredSize().height;
|
||||
int dy = lineHeight + 1;
|
||||
int insets = 3;
|
||||
int setInfoWidth = 40;
|
||||
int x = insets;
|
||||
int y = insets;
|
||||
int lineWidth = getWidth() - 2 * insets;
|
||||
int lineHeight = this.nameCostLabel.getPreferredSize().height;
|
||||
int dy = lineHeight + 1;
|
||||
|
||||
this.nameCostLabel.setBounds(x, y, lineWidth, lineHeight);
|
||||
y += dy;
|
||||
this.nameCostLabel.setBounds(x, y, lineWidth, lineHeight);
|
||||
y += dy;
|
||||
|
||||
this.typeLabel.setBounds(x, y, lineWidth, lineHeight);
|
||||
y += dy;
|
||||
this.typeLabel.setBounds(x, y, lineWidth, lineHeight);
|
||||
y += dy;
|
||||
|
||||
this.idLabel.setBounds(x, y, this.idLabel.getAutoSizeWidth(), lineHeight);
|
||||
this.powerToughnessLabel.setBounds(x, y, lineWidth, lineHeight);
|
||||
this.idLabel.setBounds(x, y, this.idLabel.getAutoSizeWidth(), lineHeight);
|
||||
this.powerToughnessLabel.setBounds(x, y, lineWidth, lineHeight);
|
||||
|
||||
//+1 to x,y so set info label right up against border and the baseline matches ID and P/T
|
||||
this.setInfoLabel.setBounds(x + lineWidth - setInfoWidth + 1, y + 1, setInfoWidth, lineHeight);
|
||||
y += dy;
|
||||
//+1 to x,y so set info label right up against border and the baseline matches ID and P/T
|
||||
this.setInfoLabel.setBounds(x + lineWidth - setInfoWidth + 1, y + 1, setInfoWidth, lineHeight);
|
||||
y += dy;
|
||||
|
||||
this.scrArea.setBounds(0, y, getWidth(), getHeight() - y);
|
||||
this.scrArea.setBounds(0, y, getWidth(), getHeight() - y);
|
||||
}
|
||||
|
||||
public final void setItem(InventoryItemFromSet item) {
|
||||
@@ -179,13 +179,13 @@ public class CardDetailPanel extends SkinnedPanel {
|
||||
|
||||
if (card.isFaceDown() && !Singletons.getControl().maySeeFaceDownCard(card)) {
|
||||
if (card.isInZone(ZoneType.Battlefield)) {
|
||||
this.nameCostLabel.setText("???");
|
||||
this.typeLabel.setText("Creature");
|
||||
this.nameCostLabel.setText("???");
|
||||
this.typeLabel.setText("Creature");
|
||||
}
|
||||
}
|
||||
else if (Singletons.getControl().mayShowCard(card) || FDialog.isModalOpen()) { //allow showing cards while modal open to account for revealing, picking, and ordering cards
|
||||
canShowThis = true;
|
||||
|
||||
|
||||
if (card.getManaCost().isNoCost()) {
|
||||
this.nameCostLabel.setText(card.getName());
|
||||
}
|
||||
@@ -197,7 +197,7 @@ public class CardDetailPanel extends SkinnedPanel {
|
||||
this.nameCostLabel.setText(FSkin.encodeSymbols(card.getName() + " - " + manaCost, true));
|
||||
}
|
||||
this.typeLabel.setText(CardDetailUtil.formatCardType(card));
|
||||
|
||||
|
||||
String set = card.getCurSetCode();
|
||||
this.setInfoLabel.setText(set);
|
||||
if (null != set && !set.isEmpty()) {
|
||||
@@ -250,6 +250,12 @@ public class CardDetailPanel extends SkinnedPanel {
|
||||
// fill the card text
|
||||
this.cdArea.setText(FSkin.encodeSymbols(CardDetailUtil.composeCardText(card, canShowThis), true));
|
||||
|
||||
if (card.isFaceDown() && card.isInZone(ZoneType.Battlefield)) {
|
||||
this.nameCostLabel.setText("???");
|
||||
this.typeLabel.setText("Creature");
|
||||
this.cdArea.setText(FSkin.encodeSymbols("(You may look at this card.)", true));
|
||||
}
|
||||
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Reference in New Issue
Block a user