mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
Prevent repeating shortcuts for abilities
This commit is contained in:
@@ -133,11 +133,13 @@ public class PlayerControllerHuman extends PlayerController {
|
||||
CMessage.SINGLETON_INSTANCE.getInputControl().selectAbility(ab);
|
||||
}
|
||||
}, enabled);
|
||||
if (shortcut > 0) {
|
||||
shortcut++;
|
||||
if (shortcut > KeyEvent.VK_9) {
|
||||
shortcut = 0; //stop adding shortcuts after 9
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hasEnabled) { //only show menu if at least one ability can be played
|
||||
SwingUtilities.invokeLater(new Runnable() { //use invoke later to ensure first ability selected by default
|
||||
public void run() {
|
||||
|
||||
Reference in New Issue
Block a user