forked from External/mage
Add support for F6
Skips everything until next turn, except for declare attackers and blockers. F11 and F9 are a better design, but F6 is provided for compatibility with established conventions. There is currently no GUI button for it.
This commit is contained in:
parent
748fcd9a16
commit
62d5d45a45
7 changed files with 75 additions and 8 deletions
|
|
@ -43,6 +43,7 @@ import java.awt.event.ComponentAdapter;
|
|||
import java.awt.event.ComponentEvent;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
|
@ -61,6 +62,7 @@ import javax.imageio.ImageIO;
|
|||
import javax.swing.AbstractButton;
|
||||
import javax.swing.Box;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.InputMap;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBoxMenuItem;
|
||||
import javax.swing.JComponent;
|
||||
|
|
@ -75,6 +77,7 @@ import javax.swing.JPanel;
|
|||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JToggleButton;
|
||||
import javax.swing.JToolBar.Separator;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.UIManager;
|
||||
|
|
@ -242,6 +245,18 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
try {
|
||||
UIManager.put("desktop", new Color(0, 0, 0, 0));
|
||||
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
|
||||
// stop JSplitPane from eating F6 and F8 or any other function keys
|
||||
{
|
||||
Object value = UIManager.get("SplitPane.ancestorInputMap");
|
||||
|
||||
if(value instanceof InputMap) {
|
||||
InputMap map = (InputMap)value;
|
||||
for(int vk = KeyEvent.VK_F2; vk <= KeyEvent.VK_F12; ++vk) {
|
||||
map.remove(KeyStroke.getKeyStroke(vk, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GUISizeHelper.calculateGUISizes();
|
||||
// UIManager.put("Table.rowHeight", GUISizeHelper.tableRowHeight);
|
||||
} catch (Exception ex) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue