From e89b921f3e64aae1235fb8c83c47b0f8983275dc Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 22 Dec 2023 10:27:00 +0100 Subject: [PATCH] Update Zone.lua --- Moose Development/Moose/Core/Zone.lua | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Core/Zone.lua b/Moose Development/Moose/Core/Zone.lua index d9abec36e..3317df260 100644 --- a/Moose Development/Moose/Core/Zone.lua +++ b/Moose Development/Moose/Core/Zone.lua @@ -2496,6 +2496,30 @@ end -- @return #ZONE_POLYGON_BASE self function ZONE_POLYGON_BASE:DrawZone(Coalition, Color, Alpha, FillColor, FillAlpha, LineType, ReadOnly, IncludeTriangles) + + 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 + + + if false then local coords = self:GetVerticiesCoordinates() local coord=coords[1] --Core.Point#COORDINATE @@ -2507,7 +2531,7 @@ function ZONE_POLYGON_BASE:DrawZone(Coalition, Color, Alpha, FillColor, FillAlph if true then return end - + end return self end