Implement basic gesture detection to delete commands
Description of the proposed changes
Adds a basic gesture detection to allow you to delete commands while in command mode. This is in particular useful when you do not use hotkeys. Often I find myself in the situation that I miss placed a build order. When you do not use hotkeys, this looks like:
- (0) Miss click a build order.
- (1) Right click to cancel command mode.
- (2) Right click to remove the build order.
- (3) Move mouse to the correct build icon and left-click it.
In particular, step 3 can be time consuming. With this feature it can be simplified to:
- (0) Miss click a build order.
- (1) Rage-move the mouse across the build order until it disappears.
And problem solved. See it also in action:
https://github.com/user-attachments/assets/687aceb0-7522-4172-bbbe-106da39a7c5d
Testing done on the proposed changes
All is tested during development. All the code is annotated. Debugging is in particular trivial since it requires no reloading of the game - see also the nice trick with using OnDirty and OnReload of the module 😃 !
Additional context
Requires https://github.com/FAForever/FA-Binary-Patches/pull/90, which is available on the FAF Develop game type. To test this pull request you'll need to start a lobby using the FAF Develop game type to retrieve the correct executable.
With thanks to @4z0t for his time and effort.
Checklist
- [x] Changes are annotated, including comments where useful
- [ ] Changes are documented in the changelog for the next game version