mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 17:58:01 +00:00
Prevent repeating shortcuts for abilities
This commit is contained in:
@@ -133,9 +133,11 @@ public class PlayerControllerHuman extends PlayerController {
|
||||
CMessage.SINGLETON_INSTANCE.getInputControl().selectAbility(ab);
|
||||
}
|
||||
}, enabled);
|
||||
shortcut++;
|
||||
if (shortcut > KeyEvent.VK_9) {
|
||||
shortcut = 0; //stop adding shortcuts after 9
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user