- Added keyboard shortcut for End Turn. (you still have to pass priority as though you pushed the button)

This commit is contained in:
moomarc
2012-09-20 11:03:28 +00:00
parent 7c769bdd02
commit 1333d13327
2 changed files with 12 additions and 1 deletions

View File

@@ -104,6 +104,15 @@ public class KeyboardShortcuts {
} }
}; };
/** End turn. */
final Action actEndTurn = new AbstractAction() {
@Override
public void actionPerformed(final ActionEvent e) {
if (Singletons.getControl().getState() != 1) { return; }
CDock.SINGLETON_INSTANCE.endTurn();
}
};
//========== Instantiate shortcut objects and add to list. //========== Instantiate shortcut objects and add to list.
list.add(new Shortcut(FPref.SHORTCUT_SHOWSTACK, "Match: show stack panel", actShowStack, am, im)); list.add(new Shortcut(FPref.SHORTCUT_SHOWSTACK, "Match: show stack panel", actShowStack, am, im));
list.add(new Shortcut(FPref.SHORTCUT_SHOWCOMBAT, "Match: show combat panel", actShowCombat, am, im)); list.add(new Shortcut(FPref.SHORTCUT_SHOWCOMBAT, "Match: show combat panel", actShowCombat, am, im));
@@ -111,6 +120,7 @@ public class KeyboardShortcuts {
list.add(new Shortcut(FPref.SHORTCUT_SHOWPLAYERS, "Match: show players panel", actShowPlayers, am, im)); list.add(new Shortcut(FPref.SHORTCUT_SHOWPLAYERS, "Match: show players panel", actShowPlayers, am, im));
list.add(new Shortcut(FPref.SHORTCUT_SHOWDEV, "Match: show dev panel", actShowDev, am, im)); list.add(new Shortcut(FPref.SHORTCUT_SHOWDEV, "Match: show dev panel", actShowDev, am, im));
list.add(new Shortcut(FPref.SHORTCUT_CONCEDE, "Match: concede game", actConcede, am, im)); list.add(new Shortcut(FPref.SHORTCUT_CONCEDE, "Match: concede game", actConcede, am, im));
list.add(new Shortcut(FPref.SHORTCUT_ENDTURN, "Match: pass priority until EOT or next stack event", actEndTurn, am, im));
return list; return list;
} // End initMatchShortcuts() } // End initMatchShortcuts()

View File

@@ -113,7 +113,8 @@ public class ForgePreferences {
SHORTCUT_SHOWCONSOLE ("76"), /** */ SHORTCUT_SHOWCONSOLE ("76"), /** */
SHORTCUT_SHOWPLAYERS ("80"), /** */ SHORTCUT_SHOWPLAYERS ("80"), /** */
SHORTCUT_SHOWDEV ("68"), /** */ SHORTCUT_SHOWDEV ("68"), /** */
SHORTCUT_CONCEDE ("17"); SHORTCUT_CONCEDE ("17"), /** */
SHORTCUT_ENDTURN ("69");
private final String strDefaultVal; private final String strDefaultVal;