mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Update Zone.lua
This commit is contained in:
parent
8fb126682f
commit
0d18ce086c
@ -2509,74 +2509,6 @@ function ZONE_POLYGON_BASE:DrawZone(Coalition, Color, Alpha, FillColor, FillAlph
|
||||
end
|
||||
|
||||
|
||||
if self._.Polygon and #self._.Polygon >= 3 then
|
||||
Coalition = Coalition or self:GetDrawCoalition()
|
||||
|
||||
-- Set draw coalition.
|
||||
self:SetDrawCoalition(Coalition)
|
||||
|
||||
Color = Color or self:GetColorRGB()
|
||||
Alpha = Alpha or 1
|
||||
|
||||
-- Set color.
|
||||
self:SetColor(Color, Alpha)
|
||||
|
||||
FillColor = FillColor or self:GetFillColorRGB()
|
||||
if not FillColor then
|
||||
UTILS.DeepCopy(Color)
|
||||
end
|
||||
FillAlpha = FillAlpha or self:GetFillColorAlpha()
|
||||
if not FillAlpha then
|
||||
FillAlpha = 0.15
|
||||
end
|
||||
|
||||
-- Set fill color -----------> has fill color worked in recent versions of DCS?
|
||||
-- doing something like
|
||||
--
|
||||
-- trigger.action.markupToAll(7, -1, 501, p.Coords[1]:GetVec3(), p.Coords[2]:GetVec3(),p.Coords[3]:GetVec3(),p.Coords[4]:GetVec3(),{1,0,0, 1}, {1,0,0, 1}, 4, false, Text or "")
|
||||
--
|
||||
-- doesn't seem to fill in the shape for an n-sided polygon
|
||||
self:SetFillColor(FillColor, FillAlpha)
|
||||
|
||||
IncludeTriangles = IncludeTriangles or false
|
||||
|
||||
-- just draw the triangles, we get the outline for free
|
||||
if IncludeTriangles then
|
||||
for _, triangle in pairs(self._Triangles) do
|
||||
local draw_ids = triangle:Draw()
|
||||
table.combine(self.DrawID, draw_ids)
|
||||
end
|
||||
-- draw outline only
|
||||
else
|
||||
local coords = self:GetVerticiesCoordinates()
|
||||
for i = 1, #coords do
|
||||
local c1 = coords[i]
|
||||
local c2 = coords[i % #coords + 1]
|
||||
table.add(self.DrawID, c1:LineToAll(c2, Coalition, Color, Alpha, LineType, ReadOnly))
|
||||
end
|
||||
end
|
||||
|
||||
if self._.Polygon and #self._.Polygon >= 3 then
|
||||
Coalition = Coalition or self:GetDrawCoalition()
|
||||
|
||||
-- Set draw coalition.
|
||||
self:SetDrawCoalition(Coalition)
|
||||
|
||||
Color = Color or self:GetColorRGB()
|
||||
Alpha = Alpha or self:GetColorAlpha()
|
||||
|
||||
FillColor = FillColor or self:GetFillColorRGB()
|
||||
FillAlpha = FillAlpha or self:GetFillColorAlpha()
|
||||
|
||||
if FillColor then
|
||||
self:ReFill(FillColor,FillAlpha)
|
||||
end
|
||||
|
||||
if Color then
|
||||
self:ReDrawBorderline(Color,Alpha,LineType)
|
||||
end
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user