mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Optimised quantity option generator
This commit is contained in:
parent
4d31d9d748
commit
e4e55430ca
@ -343,10 +343,7 @@ export class UnitSpawnMenu {
|
||||
|
||||
setMaxUnitCount(maxUnitCount: number) {
|
||||
/* Create the unit count options */
|
||||
var countOptions: string[] = [];
|
||||
for (let i = 1; i <= maxUnitCount; i++)
|
||||
countOptions.push(i.toString());
|
||||
this.#unitCountDropdown.setOptions(countOptions, "number");
|
||||
this.#unitCountDropdown.setOptions( [...Array(maxUnitCount).keys()].map( n => (n+1).toString() ), "number");
|
||||
this.#unitCountDropdown.selectValue(0);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user