mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
feat(map): added option to toggle display of temporary engagement rings
This commit is contained in:
parent
5237dc688a
commit
600b649449
@ -406,6 +406,7 @@ export const MAP_OPTIONS_DEFAULTS: MapOptions = {
|
||||
showUnitLabels: true,
|
||||
showUnitsEngagementRings: true,
|
||||
showUnitsAcquisitionRings: true,
|
||||
showUnitsTemporaryEngagementRings: true,
|
||||
showRacetracks: true,
|
||||
fillSelectedRing: false,
|
||||
showMinimap: false,
|
||||
|
||||
@ -18,6 +18,7 @@ export type MapOptions = {
|
||||
showUnitLabels: boolean;
|
||||
showUnitsEngagementRings: boolean;
|
||||
showUnitsAcquisitionRings: boolean;
|
||||
showUnitsTemporaryEngagementRings: boolean;
|
||||
showRacetracks: boolean;
|
||||
fillSelectedRing: boolean;
|
||||
showMinimap: boolean;
|
||||
|
||||
@ -160,6 +160,17 @@ export function OptionsMenu(props: { open: boolean; onClose: () => void; childre
|
||||
<OlCheckbox checked={mapOptions.showUnitsAcquisitionRings} onChange={() => {}}></OlCheckbox>
|
||||
<span className="my-auto">Show detection rings</span>
|
||||
</div>
|
||||
<div
|
||||
className={`
|
||||
group flex cursor-pointer flex-row content-center justify-start
|
||||
gap-4 rounded-md p-2
|
||||
dark:hover:bg-olympus-400
|
||||
`}
|
||||
onClick={() => getApp().getMap().setOption("showUnitsTemporaryEngagementRings", !mapOptions.showUnitsTemporaryEngagementRings)}
|
||||
>
|
||||
<OlCheckbox checked={mapOptions.showUnitsTemporaryEngagementRings} onChange={() => {}}></OlCheckbox>
|
||||
<span className="my-auto">Show temporary engagement rings</span>
|
||||
</div>
|
||||
<div
|
||||
className={`
|
||||
group flex cursor-pointer flex-row content-center justify-start
|
||||
|
||||
@ -1644,6 +1644,7 @@ export abstract class Unit extends CustomMarker {
|
||||
showTemporaryEngagementRing() {
|
||||
if (!getApp().getMap().getOptions().showUnitsEngagementRings
|
||||
&& !getApp().getMap().getOptions().showUnitsAcquisitionRings
|
||||
&& getApp().getMap().getOptions().showUnitsTemporaryEngagementRings
|
||||
&& this.#engagementRange > 0) {
|
||||
this.#temporaryEngagementCircle.setLatLng(this.getPosition());
|
||||
this.#temporaryEngagementCircle.setRadius(this.#engagementRange);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user