mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Make non-interactive map elements unobstructive.
This makes most of the lines and polygons on the map non-interactive so they don't capture mouse events, and also makes the culling exclusion zones unfilled so they don't obscure real map objects in dense areas. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1217
This commit is contained in:
parent
3bb974b9e0
commit
f727712bfa
@ -19,6 +19,7 @@ Saves from 3.x are not compatible with 4.0.
|
||||
|
||||
* **[Campaign AI]** Fix procurement for factions that lack some unit types.
|
||||
* **[Mission Generation]** Fixed problem with mission load when control point name contained an apostrophe.
|
||||
* **[UI]** Made non-interactive map elements less obstructive.
|
||||
|
||||
# 3.0.0
|
||||
|
||||
|
||||
@ -428,6 +428,7 @@ class ControlPoint {
|
||||
return L.polyline([this.cp.position, destination], {
|
||||
color: Colors.Green,
|
||||
weight: 1,
|
||||
interactive: false,
|
||||
});
|
||||
}
|
||||
|
||||
@ -519,6 +520,7 @@ class TheaterGroundObject {
|
||||
color: detectionColor,
|
||||
fill: false,
|
||||
weight: 1,
|
||||
interactive: false,
|
||||
}).addTo(detectionLayer);
|
||||
});
|
||||
|
||||
@ -528,6 +530,7 @@ class TheaterGroundObject {
|
||||
color: threatColor,
|
||||
fill: false,
|
||||
weight: 2,
|
||||
interactive: false,
|
||||
}).addTo(threatLayer);
|
||||
});
|
||||
}
|
||||
@ -737,12 +740,15 @@ class Flight {
|
||||
const color = this.flight.blue ? Colors.Blue : Colors.Red;
|
||||
const layer = this.flightPlanLayer();
|
||||
if (this.flight.selected) {
|
||||
this.path = L.polyline(path, { color: Colors.Highlight })
|
||||
this.path = L.polyline(path, {
|
||||
color: Colors.Highlight,
|
||||
interactive: false,
|
||||
})
|
||||
.addTo(selectedFlightPlansLayer)
|
||||
.addTo(layer)
|
||||
.addTo(allFlightPlansLayer);
|
||||
} else {
|
||||
this.path = L.polyline(path, { color: color })
|
||||
this.path = L.polyline(path, { color: color, interactive: false })
|
||||
.addTo(layer)
|
||||
.addTo(allFlightPlansLayer);
|
||||
}
|
||||
@ -760,6 +766,7 @@ class Flight {
|
||||
this.commitBoundary = L.polyline(this.flight.commitBoundary, {
|
||||
color: Colors.Highlight,
|
||||
weight: 1,
|
||||
interactive: false,
|
||||
})
|
||||
.addTo(selectedFlightPlansLayer)
|
||||
.addTo(this.flightPlanLayer())
|
||||
@ -819,6 +826,7 @@ function _drawThreatZones(zones, layer, player) {
|
||||
fill: true,
|
||||
fillOpacity: 0.4,
|
||||
noClip: true,
|
||||
interactive: false,
|
||||
}).addTo(layer);
|
||||
}
|
||||
}
|
||||
@ -874,6 +882,7 @@ function drawNavmesh(zones, layer) {
|
||||
color: "#000000",
|
||||
weight: 1,
|
||||
fill: false,
|
||||
interactive: false,
|
||||
}).addTo(layer);
|
||||
}
|
||||
}
|
||||
@ -896,6 +905,7 @@ function drawMapZones() {
|
||||
color: "#344455",
|
||||
fillColor: "#344455",
|
||||
fillOpacity: 1,
|
||||
interactive: false,
|
||||
}).addTo(seaZones);
|
||||
}
|
||||
|
||||
@ -904,6 +914,7 @@ function drawMapZones() {
|
||||
color: "#969696",
|
||||
fillColor: "#4b4b4b",
|
||||
fillOpacity: 1,
|
||||
interactive: false,
|
||||
}).addTo(inclusionZones);
|
||||
}
|
||||
|
||||
@ -912,6 +923,7 @@ function drawMapZones() {
|
||||
color: "#969696",
|
||||
fillColor: "#303030",
|
||||
fillOpacity: 1,
|
||||
interactive: false,
|
||||
}).addTo(exclusionZones);
|
||||
}
|
||||
}
|
||||
@ -923,7 +935,8 @@ function drawUnculledZones() {
|
||||
L.circle(zone.position, {
|
||||
radius: zone.radius,
|
||||
color: "#b4ff8c",
|
||||
stroke: false,
|
||||
fill: false,
|
||||
interactive: false,
|
||||
}).addTo(unculledZones);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user