forked from External/mage
Displayint card name in choice dialog. Bigger cards for choice many.
This commit is contained in:
parent
8f0159d706
commit
638a6368d2
8 changed files with 51 additions and 31 deletions
|
|
@ -94,6 +94,8 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
|||
private boolean animationInProgress = false;
|
||||
private JButton dayNightButton;
|
||||
|
||||
private boolean displayTitleAnyway;
|
||||
|
||||
public CardPanel(CardView newGameCard, UUID gameId, final boolean loadImage, ActionCallback callback, final boolean foil) {
|
||||
this.gameCard = newGameCard;
|
||||
this.callback = callback;
|
||||
|
|
@ -197,6 +199,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
|||
if (gameCard.isTransformed()) {
|
||||
toggleTransformed();
|
||||
}
|
||||
setText(gameCard);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} catch (Error err) {
|
||||
|
|
@ -207,6 +210,11 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
|||
}
|
||||
|
||||
private void setText(CardView card) {
|
||||
if (displayTitleAnyway) {
|
||||
titleText.setText(card.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
if (hasImage) {
|
||||
titleText.setText("");
|
||||
} else {
|
||||
|
|
@ -595,6 +603,12 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showCardTitle() {
|
||||
displayTitleAnyway = true;
|
||||
setText(gameCard);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBeginAnimation() {
|
||||
animationInProgress = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue