* Prevented possible error when closing game panel while popup text is going to be shown.

This commit is contained in:
LevelX2 2014-02-18 01:09:15 +01:00
parent 724d84c532
commit 0074f2a487

View file

@ -725,8 +725,11 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
if (!popupShowing) {
synchronized (this) {
if (!popupShowing) {
TransferData transferData = getTransferDataForMouseEntered();
if (this.isShowing()) {
popupShowing = true;
callback.mouseEntered(e, getTransferDataForMouseEntered());
callback.mouseEntered(e, transferData);
}
}
}
}
@ -790,7 +793,11 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
data.gameId = this.gameId;
data.popupOffsetX = isTapped() ? cardHeight + cardXOffset + POPUP_X_GAP : cardWidth + cardXOffset + POPUP_X_GAP;
data.popupOffsetY = 40;
if (this.isShowing()) {
data.locationOnScreen = this.getLocationOnScreen();
} else {
}
return data;
}