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() {
|
VDetail.SINGLETON_INSTANCE.getPnlDetail().addMouseListener(new MouseAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(final MouseEvent e) {
|
public void mouseClicked(final MouseEvent e) {
|
||||||
|
if (VDetail.SINGLETON_INSTANCE.getPnlDetail().getCard() == null) { return; }
|
||||||
|
|
||||||
if (VDetail.SINGLETON_INSTANCE.getPnlDetail().getCard().isDoubleFaced()) {
|
if (VDetail.SINGLETON_INSTANCE.getPnlDetail().getCard().isDoubleFaced()) {
|
||||||
CPicture.SINGLETON_INSTANCE.flipCard();
|
CPicture.SINGLETON_INSTANCE.flipCard();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ public enum CPicture implements ICDoc {
|
|||||||
VPicture.SINGLETON_INSTANCE.getPnlPicture().addMouseListener(new MouseAdapter() {
|
VPicture.SINGLETON_INSTANCE.getPnlPicture().addMouseListener(new MouseAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(final MouseEvent e) {
|
public void mouseClicked(final MouseEvent e) {
|
||||||
|
if (VPicture.SINGLETON_INSTANCE.getPnlPicture().getCard() == null) { return; }
|
||||||
|
|
||||||
if (VPicture.SINGLETON_INSTANCE.getPnlPicture().getCard().isDoubleFaced()) {
|
if (VPicture.SINGLETON_INSTANCE.getPnlPicture().getCard().isDoubleFaced()) {
|
||||||
flipCard();
|
flipCard();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,11 @@ public enum VDetail implements IVDoc {
|
|||||||
private final JLabel lblFlipcard = new JLabel(
|
private final JLabel lblFlipcard = new JLabel(
|
||||||
FSkin.getIcon(FSkin.InterfaceIcons.ICO_FLIPCARD));
|
FSkin.getIcon(FSkin.InterfaceIcons.ICO_FLIPCARD));
|
||||||
|
|
||||||
|
//========= Constructor
|
||||||
|
private VDetail() {
|
||||||
|
lblFlipcard.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
//========= Overridden methods
|
//========= Overridden methods
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see forge.gui.framework.IVDoc#populate()
|
* @see forge.gui.framework.IVDoc#populate()
|
||||||
|
|||||||
Reference in New Issue
Block a user