mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
commit
707b629130
1 changed files with 12 additions and 9 deletions
|
|
@ -183,19 +183,22 @@ public class DraftGrid extends javax.swing.JPanel implements MouseListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent e) {
|
public void mouseClicked(MouseEvent e) {
|
||||||
|
if (e.getClickCount() == 2) {
|
||||||
|
if (e.getButton() == MouseEvent.BUTTON1) {
|
||||||
|
Object obj = e.getSource();
|
||||||
|
if (obj instanceof MageCard) {
|
||||||
|
this.cardEventSource.doubleClick(((MageCard)obj).getOriginal(), "pick-a-card");
|
||||||
|
this.hidePopup();
|
||||||
|
AudioManager.playOnDraftSelect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mousePressed(MouseEvent e) {
|
public void mousePressed(MouseEvent e) {
|
||||||
if (e.getButton() == MouseEvent.BUTTON1) { // only left click select
|
if (e.getButton() == MouseEvent.BUTTON1 || e.getButton() == MouseEvent.BUTTON3) { // left or right click
|
||||||
Object obj = e.getSource();
|
|
||||||
if (obj instanceof MageCard) {
|
|
||||||
this.cardEventSource.doubleClick(((MageCard)obj).getOriginal(), "pick-a-card");
|
|
||||||
this.hidePopup();
|
|
||||||
AudioManager.playOnDraftSelect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (e.getButton() == MouseEvent.BUTTON3) { // only right click mark
|
|
||||||
Object obj = e.getSource();
|
Object obj = e.getSource();
|
||||||
if (obj instanceof MageCard) {
|
if (obj instanceof MageCard) {
|
||||||
if (this.markedCard != null) {
|
if (this.markedCard != null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue