mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18: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);
|
CMessage.SINGLETON_INSTANCE.getInputControl().selectAbility(ab);
|
||||||
}
|
}
|
||||||
}, enabled);
|
}, enabled);
|
||||||
shortcut++;
|
if (shortcut > 0) {
|
||||||
if (shortcut > KeyEvent.VK_9) {
|
shortcut++;
|
||||||
shortcut = 0; //stop adding shortcuts after 9
|
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
|
if (hasEnabled) { //only show menu if at least one ability can be played
|
||||||
|
|||||||
Reference in New Issue
Block a user