Fixed #178: During watching a game you get Concede and Cancel as menu point with right mouse button

This commit is contained in:
magenoxx 2013-03-29 17:36:03 +04:00
parent 05191e8793
commit fab1417421
2 changed files with 12 additions and 1 deletions

View file

@ -51,6 +51,7 @@ public class PlayAreaPanel extends javax.swing.JPanel {
private UUID playerId;
private UUID gameId;
private boolean smallMode = false;
private boolean playingMode = true;
public static final int PANEL_HEIGHT = 242;
public static final int PANEL_HEIGHT_SMALL = 190;
@ -91,7 +92,7 @@ public class PlayAreaPanel extends javax.swing.JPanel {
battlefieldPanel.getMainPanel().addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent Me) {
if (Me.isPopupTrigger()) {
if (Me.isPopupTrigger() && playingMode) {
Pmenu.show(Me.getComponent(), Me.getX(), Me.getY());
}
}
@ -183,6 +184,10 @@ public class PlayAreaPanel extends javax.swing.JPanel {
return smallMode;
}
public void setPlayingMode(boolean playingMode) {
this.playingMode = playingMode;
}
private mage.client.game.BattlefieldPanel battlefieldPanel;
private javax.swing.JButton btnCheat;
//private javax.swing.JScrollPane jScrollPane1;