diff --git a/Mage.Client/src/main/java/mage/client/game/GamePanel.java b/Mage.Client/src/main/java/mage/client/game/GamePanel.java index 2f7e7bbe96..3b3c2ea5bb 100644 --- a/Mage.Client/src/main/java/mage/client/game/GamePanel.java +++ b/Mage.Client/src/main/java/mage/client/game/GamePanel.java @@ -56,10 +56,7 @@ import javax.swing.GroupLayout.Alignment; import javax.swing.LayoutStyle.ComponentPlacement; import javax.swing.border.LineBorder; import java.awt.*; -import java.awt.event.ComponentAdapter; -import java.awt.event.ComponentEvent; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; +import java.awt.event.*; import java.io.Serializable; import java.util.*; import java.util.concurrent.CancellationException; @@ -736,6 +733,17 @@ public class GamePanel extends javax.swing.JPanel { } }); + int c = JComponent.WHEN_IN_FOCUSED_WINDOW; + KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0); + + this.getInputMap(c).put(ks, "PRESS"); + this.getActionMap().put("PRESS", new AbstractAction() { + @Override + public void actionPerformed(ActionEvent actionEvent) { + btnEndTurnActionPerformed(null); + } + }); + btnSwitchHands.setText("Switch Hands"); btnSwitchHands.addMouseListener(new MouseAdapter() { @Override diff --git a/Mage.Client/src/main/java/mage/client/game/HelperPanel.java b/Mage.Client/src/main/java/mage/client/game/HelperPanel.java index 77075071c4..e5d0638206 100644 --- a/Mage.Client/src/main/java/mage/client/game/HelperPanel.java +++ b/Mage.Client/src/main/java/mage/client/game/HelperPanel.java @@ -73,14 +73,8 @@ public class HelperPanel extends JPanel { textArea = new MageTextArea(); textArea.setText(""); - //jScrollPane1 = new javax.swing.JScrollPane(); - //jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); - //jScrollPane1.setViewportView(textArea); - //jScrollPane1.setBorder(null); - jPanel.setOpaque(false); jPanel.setBackground(new Color(0, 0, 0, 80)); - //jPanel.add(jScrollPane1); jPanel.add(textArea); add(jPanel); @@ -96,18 +90,6 @@ public class HelperPanel extends JPanel { btnRight.setVisible(false); container.add(btnRight); - //btnStopTimer = new JButton("Stop timer"); - //btnStopTimer.setToolTipText("Stop auto phase skipping timer"); - //add(btnStopTimer); - - /* - btnEndTurn = new JButton("End Turn"); - btnEndTurn.setToolTipText("End The Turn"); - btnEndTurn.setFocusable(false); - btnEndTurn.setVisible(false); - container.add(btnEndTurn); - */ - btnLeft.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { if (linkLeft != null) {{