Command mode hold
This commit is contained in:
@@ -278,18 +278,13 @@ public class DesktopInput extends InputHandler{
|
||||
shouldShoot = !scene.hasMouse() && !locked;
|
||||
|
||||
if(!locked && state.rules.unitCommand && block == null){
|
||||
if(input.keyTap(Binding.commandMode)){
|
||||
commandMode = !commandMode;
|
||||
}
|
||||
//if(input.keyTap(Binding.commandMode)){
|
||||
commandMode = input.keyDown(Binding.commandMode);
|
||||
//}
|
||||
}else{
|
||||
commandMode = false;
|
||||
}
|
||||
|
||||
//TODO should selected units be cleared out of command mode?
|
||||
if(!commandMode){
|
||||
//selectedUnits.clear();
|
||||
}
|
||||
|
||||
//validate commanding units
|
||||
selectedUnits.removeAll(u -> !u.isCommandable() || !u.isValid());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user