* Fixed a problem that the enlarged card view could stay open after a game or draft were finished.

This commit is contained in:
LevelX2 2016-10-23 23:13:02 +02:00
parent bd0e288087
commit 070a0ca3fa
5 changed files with 2319 additions and 2305 deletions

View file

@ -336,7 +336,7 @@ public class DraftPanel extends javax.swing.JPanel {
if (view != null) { if (view != null) {
loadCardsToPickedCardsArea(view.getPicks()); loadCardsToPickedCardsArea(view.getPicks());
draftBooster.loadBooster(EMPTY_VIEW, bigCard); draftBooster.loadBooster(EMPTY_VIEW, bigCard);
Plugins.getInstance().getActionCallback().hideTooltipPopup(); Plugins.getInstance().getActionCallback().hideOpenComponents();
setMessage("Waiting for other players"); setMessage("Waiting for other players");
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -419,11 +419,16 @@ public class MageActionCallback implements ActionCallback {
} }
} }
@Override
public void hideOpenComponents() {
this.hideTooltipPopup();
this.hideEnlargedCard();
}
/** /**
* Hides the text popup window * Hides the text popup window
* *
*/ */
@Override
public void hideTooltipPopup() { public void hideTooltipPopup() {
this.tooltipCard = null; this.tooltipCard = null;
if (tooltipPopup != null) { if (tooltipPopup != null) {

View file

@ -4,14 +4,23 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent; import java.awt.event.MouseWheelEvent;
public interface ActionCallback { public interface ActionCallback {
void mouseClicked(MouseEvent e, TransferData data); void mouseClicked(MouseEvent e, TransferData data);
void mousePressed(MouseEvent e, TransferData data); void mousePressed(MouseEvent e, TransferData data);
void mouseReleased(MouseEvent e, TransferData data); void mouseReleased(MouseEvent e, TransferData data);
void mouseMoved(MouseEvent e, TransferData data); void mouseMoved(MouseEvent e, TransferData data);
void mouseDragged(MouseEvent e, TransferData data); void mouseDragged(MouseEvent e, TransferData data);
void mouseEntered(MouseEvent e, TransferData data); void mouseEntered(MouseEvent e, TransferData data);
void mouseExited(MouseEvent e, TransferData data); void mouseExited(MouseEvent e, TransferData data);
void mouseWheelMoved(MouseWheelEvent e, TransferData data); void mouseWheelMoved(MouseWheelEvent e, TransferData data);
void hideTooltipPopup();
void hideOpenComponents();
} }

View file

@ -1,14 +1,13 @@
package mage.cards.action.impl; package mage.cards.action.impl;
import mage.cards.action.ActionCallback;
import mage.cards.action.TransferData;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent; import java.awt.event.MouseWheelEvent;
import mage.cards.action.ActionCallback;
import mage.cards.action.TransferData;
/** /**
* Callback that does nothing on any action * Callback that does nothing on any action
* *
* @author nantuko84 * @author nantuko84
*/ */
public class EmptyCallback implements ActionCallback { public class EmptyCallback implements ActionCallback {
@ -35,7 +34,7 @@ public class EmptyCallback implements ActionCallback {
} }
@Override @Override
public void hideTooltipPopup() { public void hideOpenComponents() {
} }
@Override @Override