Closed OskarPedersen closed 3 years ago
Cool! The original behavior of the escape key cancels the current cursor mode (e.g. if the player has clicked the Attack button or selected a structure to build, but hasn't issued an order yet) before deselecting units, so it's worth inserting a quick check if cursorMode
is not NormalCursorMode
in there (there are a number of examples elsewhere in GameScene
). Also, indentation should be 4 spaces.
Glad to see another contributor to RWE :)
Welcome! Yep I think if this had the suggestions from Skirmisher it would be perfect :)
Thanks! Wasn't aware that the escape key did that as well, updated the PR.
Allows units to be deselected with the escape key. Edit: If the current cursor mode is not normal, pressing escape will return to the normal cursor mode.