forked from External/mage
[card.plugin] unified mouse adapter. now tooltips should work.
This commit is contained in:
parent
fa99548105
commit
b501b10f9a
13 changed files with 205 additions and 57 deletions
|
|
@ -58,7 +58,6 @@ import mage.view.CardsView;
|
|||
public class Cards extends javax.swing.JPanel {
|
||||
|
||||
private Map<UUID, MageCard> cards = new HashMap<UUID, MageCard>();
|
||||
private boolean mouseHandlingEnabled = false;
|
||||
|
||||
/** Creates new form Cards */
|
||||
public Cards() {
|
||||
|
|
@ -90,16 +89,6 @@ public class Cards extends javax.swing.JPanel {
|
|||
}
|
||||
}
|
||||
|
||||
if (!mouseHandlingEnabled) {
|
||||
synchronized (this) {
|
||||
if (!mouseHandlingEnabled) {
|
||||
mouseHandlingEnabled = true;
|
||||
jScrollPane1.addMouseListener(new MageMouseAdapter(cardArea, gameId));
|
||||
jScrollPane1.addMouseMotionListener(new MageMouseMotionAdapter(cardArea, bigCard));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cardArea.setPreferredSize(new Dimension(cards.size() * Config.dimensions.frameWidth, Config.dimensions.frameHeight));
|
||||
cardArea.revalidate();
|
||||
cardArea.repaint();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue