Merge pull request #411 from Pax1601/410-update-shortcuts-to-plugin-friendly-format

Converted for plugin use
This commit is contained in:
Pax1601
2023-10-02 09:03:30 +02:00
committed by GitHub
7 changed files with 79 additions and 32 deletions

View File

@@ -201,8 +201,12 @@ export class UnitsManager {
*
* @param hotgroup The hotgroup number
*/
selectUnitsByHotgroup(hotgroup: number) {
this.deselectAllUnits();
selectUnitsByHotgroup(hotgroup: number, deselectAllUnits: boolean = true ) {
if ( deselectAllUnits ) {
this.deselectAllUnits();
}
this.getUnitsByHotgroup(hotgroup).forEach((unit: Unit) => unit.setSelected(true))
}