A few tweaks to card flip code.

This commit is contained in:
Doublestrike
2012-05-27 06:57:06 +00:00
parent 22d899aeee
commit 8a34fe302d
3 changed files with 9 additions and 0 deletions

View File

@@ -74,6 +74,8 @@ public enum CDetail implements ICDoc {
VDetail.SINGLETON_INSTANCE.getPnlDetail().addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(final MouseEvent e) {
if (VDetail.SINGLETON_INSTANCE.getPnlDetail().getCard() == null) { return; }
if (VDetail.SINGLETON_INSTANCE.getPnlDetail().getCard().isDoubleFaced()) {
CPicture.SINGLETON_INSTANCE.flipCard();
}

View File

@@ -74,6 +74,8 @@ public enum CPicture implements ICDoc {
VPicture.SINGLETON_INSTANCE.getPnlPicture().addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(final MouseEvent e) {
if (VPicture.SINGLETON_INSTANCE.getPnlPicture().getCard() == null) { return; }
if (VPicture.SINGLETON_INSTANCE.getPnlPicture().getCard().isDoubleFaced()) {
flipCard();
}

View File

@@ -47,6 +47,11 @@ public enum VDetail implements IVDoc {
private final JLabel lblFlipcard = new JLabel(
FSkin.getIcon(FSkin.InterfaceIcons.ICO_FLIPCARD));
//========= Constructor
private VDetail() {
lblFlipcard.setVisible(false);
}
//========= Overridden methods
/* (non-Javadoc)
* @see forge.gui.framework.IVDoc#populate()