mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
DraftGrid: replaced double-click by single press.
This commit is contained in:
parent
84a152fea3
commit
e9eb3231c3
2 changed files with 7 additions and 3 deletions
|
@ -94,17 +94,21 @@ public class DraftGrid extends javax.swing.JPanel implements MouseListener {
|
|||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (e.getClickCount() == 2 && !e.isConsumed()) {
|
||||
/*if (e.getClickCount() == 2 && !e.isConsumed()) {
|
||||
e.consume();
|
||||
Object obj = e.getSource();
|
||||
if (obj instanceof MageCard) {
|
||||
this.cardEventSource.doubleClick(((MageCard)obj).getOriginal().getId(), "double-click");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e) {
|
||||
Object obj = e.getSource();
|
||||
if (obj instanceof MageCard) {
|
||||
this.cardEventSource.doubleClick(((MageCard)obj).getOriginal().getId(), "pick-a-card");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -72,7 +72,7 @@ public class DraftPanel extends javax.swing.JPanel {
|
|||
new Listener<Event> () {
|
||||
@Override
|
||||
public void event(Event event) {
|
||||
if (event.getEventName().equals("double-click")) {
|
||||
if (event.getEventName().equals("pick-a-card")) {
|
||||
session.sendCardPick(draftId, (UUID)event.getSource());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue