mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
A few tweaks to card flip code.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user