Commit 482ab4b8 authored by Peter Patel-Schneider's avatar Peter Patel-Schneider

Add left-click to top and right-click to bottom for ListCardArea

parent f3f9a915
......@@ -200,12 +200,12 @@ public abstract class FloatingCardArea extends CardArea {
super.mouseOver(panel, evt);
}
@Override
public final void mouseLeftClicked(final CardPanel panel, final MouseEvent evt) {
public void mouseLeftClicked(final CardPanel panel, final MouseEvent evt) {
getMatchUI().getGameController().selectCard(panel.getCard(), null, new MouseTriggerEvent(evt));
super.mouseLeftClicked(panel, evt);
}
@Override
public final void mouseRightClicked(final CardPanel panel, final MouseEvent evt) {
public void mouseRightClicked(final CardPanel panel, final MouseEvent evt) {
getMatchUI().getGameController().selectCard(panel.getCard(), null, new MouseTriggerEvent(evt));
super.mouseRightClicked(panel, evt);
}
......
......@@ -232,4 +232,29 @@ public class ListCardArea extends FloatingCardArea {
//}
}
@Override
public final void mouseLeftClicked(final CardPanel panel, final MouseEvent evt) {
final Card clickCard = panelToCard(panel);
if (moveableCards.contains(clickCard) && toTop) {
synchronized (cardList) {
cardList.remove(clickCard);
cardList.add(0,clickCard);
}
refresh();
}
super.mouseLeftClicked(panel, evt);
}
@Override
public final void mouseRightClicked(final CardPanel panel, final MouseEvent evt) {
final Card clickCard = panelToCard(panel);
if (moveableCards.contains(clickCard) && toBottom ) {
synchronized (cardList) {
cardList.remove(clickCard);
cardList.add(clickCard);
}
refresh();
}
super.mouseRightClicked(panel, evt);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment