parent
0b86ad0d36
commit
fd4bfbcd77
|
@ -718,7 +718,7 @@ public class MagicGame {
|
|||
return players[1-player.getIndex()];
|
||||
}
|
||||
|
||||
private void setVisiblePlayer(final MagicPlayer aVisiblePlayer) {
|
||||
public void setVisiblePlayer(final MagicPlayer aVisiblePlayer) {
|
||||
visiblePlayer = aVisiblePlayer;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public final class GamePanel extends JPanel {
|
|||
|
||||
private static final String ACTION_KEY="action";
|
||||
private static final String UNDO_KEY="undo";
|
||||
// private static final String SWITCH_KEY="switch";
|
||||
private static final String SWITCH_KEY="switch";
|
||||
private static final String LOG_KEY="log";
|
||||
private static final String PASS_KEY="pass";
|
||||
|
||||
|
@ -176,13 +176,13 @@ public final class GamePanel extends JPanel {
|
|||
}
|
||||
});
|
||||
|
||||
/* getActionMap().put(SWITCH_KEY, new AbstractAction() {
|
||||
getActionMap().put(SWITCH_KEY, new AbstractAction() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent e) {
|
||||
switchKeyPressed();
|
||||
}
|
||||
}); */
|
||||
});
|
||||
|
||||
getActionMap().put(LOG_KEY, new AbstractAction() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -205,13 +205,13 @@ public final class GamePanel extends JPanel {
|
|||
//defining shortcut keys
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0),ACTION_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0),ACTION_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0),UNDO_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),UNDO_KEY);
|
||||
// getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),SWITCH_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0),LOG_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_M, 0),LOG_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_MASK),PASS_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, InputEvent.SHIFT_MASK),PASS_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0),UNDO_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),UNDO_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0),LOG_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_M, 0),LOG_KEY);
|
||||
getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_S, 0),SWITCH_KEY);
|
||||
|
||||
stackCombatViewer=new StackCombatViewer(viewerInfo,controller);
|
||||
handGraveyardViewer=new HandGraveyardExileViewer(viewerInfo,controller);
|
||||
|
@ -252,13 +252,17 @@ public final class GamePanel extends JPanel {
|
|||
return gameDuelViewer.getGameViewer().isUndoEnabled();
|
||||
}
|
||||
|
||||
/* private void switchKeyPressed() {
|
||||
private void switchKeyPressed() {
|
||||
game.setVisiblePlayer(game.getVisiblePlayer().getOpponent());
|
||||
updateView();
|
||||
/*
|
||||
if (textViewButton.isEnabled()) {
|
||||
final boolean selected=!textViewButton.isSelected();
|
||||
textViewButton.setSelected(selected);
|
||||
frame.setTextImageMode(selected);
|
||||
}
|
||||
} */
|
||||
*/
|
||||
}
|
||||
|
||||
private void showLogBook(final boolean visible) {
|
||||
if (visible) {
|
||||
|
|
Loading…
Reference in New Issue