diff --git a/client/demo.js b/client/demo.js index 2bcb808a..8c3a2085 100644 --- a/client/demo.js +++ b/client/demo.js @@ -132,6 +132,8 @@ class DemoDataGenerator { DEMO_UNIT_DATA[idx].position.lat += idx / 100; DEMO_UNIT_DATA[idx].category = "GroundUnit"; DEMO_UNIT_DATA[idx].isLeader = true; + DEMO_UNIT_DATA[idx].coalition = 0; + DEMO_UNIT_DATA[idx].operateAs = 2; idx += 1; DEMO_UNIT_DATA[idx] = JSON.parse(JSON.stringify(baseData)); @@ -141,6 +143,7 @@ class DemoDataGenerator { DEMO_UNIT_DATA[idx].category = "GroundUnit"; DEMO_UNIT_DATA[idx].isLeader = true; DEMO_UNIT_DATA[idx].coalition = 0; + DEMO_UNIT_DATA[idx].operateAs = 1; idx += 1; DEMO_UNIT_DATA[idx] = JSON.parse(JSON.stringify(baseData)); diff --git a/client/public/stylesheets/style/style.css b/client/public/stylesheets/style/style.css index 5eb11f5b..1bd3c351 100644 --- a/client/public/stylesheets/style/style.css +++ b/client/public/stylesheets/style/style.css @@ -1469,6 +1469,10 @@ input[type=number]::-webkit-outer-spin-button { background-color: var(--ol-switch-off); } +.switch-control.yes-no .ol-switch[data-value="undefined"] .ol-switch-fill { + background-color: var(--ol-switch-undefined); +} + .switch-control.coalition .ol-switch>.ol-switch-fill::before, .switch-control.yes-no .ol-switch>.ol-switch-fill::before { translate:-100% 0; @@ -1484,13 +1488,17 @@ input[type=number]::-webkit-outer-spin-button { } .switch-control.coalition [data-value="true"] .ol-switch-fill { - background-color: var(--accent-light-blue); + background-color: var(--primary-blue); } .switch-control.coalition [data-value="false"] .ol-switch-fill { background-color: var(--primary-red); } +.switch-control.coalition [data-value="undefined"] .ol-switch-fill { + background-color: var(--ol-switch-undefined); +} + .switch-control.coalition [data-value="true"]>.ol-switch-fill::before { content: "BLUE" !important; } diff --git a/client/public/themes/olympus/theme.css b/client/public/themes/olympus/theme.css index b086467c..2da7dde9 100644 --- a/client/public/themes/olympus/theme.css +++ b/client/public/themes/olympus/theme.css @@ -46,6 +46,7 @@ --ol-select-secondary: #545F6C; --ol-switch-off:#686868; + --ol-switch-undefined:#383838; /*** General border radii **/ --border-radius-xs: 2px; diff --git a/client/src/panels/unitcontrolpanel.ts b/client/src/panels/unitcontrolpanel.ts index ba135fdb..02d51a14 100644 --- a/client/src/panels/unitcontrolpanel.ts +++ b/client/src/panels/unitcontrolpanel.ts @@ -175,6 +175,7 @@ export class UnitControlPanel extends Panel { this.#AWACSSwitch.resetExpectedValue(); this.#onOffSwitch.resetExpectedValue(); this.#followRoadsSwitch.resetExpectedValue(); + this.#operateAsSwitch.resetExpectedValue(); this.#altitudeSlider.resetExpectedValue(); this.#speedSlider.resetExpectedValue(); this.#calculateMaxHeight(); diff --git a/client/src/unit/unitsmanager.ts b/client/src/unit/unitsmanager.ts index f2168c7a..da0cd331 100644 --- a/client/src/unit/unitsmanager.ts +++ b/client/src/unit/unitsmanager.ts @@ -325,7 +325,7 @@ export class UnitsManager { var value: any = variableGetter(units[0]); units.forEach((unit: Unit) => { if (variableGetter(unit) !== value) - return undefined; + value = undefined; }); return value; };