make DefaulActionCallback an enum and remove unused parameter

This commit is contained in:
igoudt 2017-04-26 10:23:49 +02:00
parent ce26e5c8dd
commit 0528555075
3 changed files with 6 additions and 14 deletions

View file

@ -67,7 +67,6 @@ public class MageActionCallback implements ActionCallback {
private Popup tooltipPopup;
private JPopupMenu jPopupMenu;
private BigCard bigCard;
protected static final DefaultActionCallback defaultCallback = DefaultActionCallback.getInstance();
private CardView tooltipCard;
private TransferData popupData;
@ -236,14 +235,14 @@ public class MageActionCallback implements ActionCallback {
this.startedDragging = false;
if (maxXOffset < MIN_X_OFFSET_REQUIRED) { // we need this for protection from small card movements
transferData.component.requestFocusInWindow();
defaultCallback.mouseClicked(e, transferData.gameId, transferData.card);
DefaultActionCallback.instance.mouseClicked(transferData.gameId, transferData.card);
// Closes popup & enlarged view if a card/Permanent is selected
hideTooltipPopup();
}
e.consume();
} else {
transferData.component.requestFocusInWindow();
defaultCallback.mouseClicked(e, transferData.gameId, transferData.card);
DefaultActionCallback.instance.mouseClicked(transferData.gameId, transferData.card);
// Closes popup & enlarged view if a card/Permanent is selected
hideTooltipPopup();
e.consume();