Bug fixes

- Fixed an error showing SetBorderSizes().
- Fixed an error while on a Battleground.
- Fixed tiny threat green icon.
This commit is contained in:
Tercio Jose
2021-05-25 15:29:12 -03:00
parent e3747dc46a
commit 6bde881fb8
8 changed files with 109 additions and 6 deletions
+49
View File
@@ -0,0 +1,49 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\..\FrameXML\UI.xsd">
<Script file="DFFramesInclude.lua" />
<Frame name="DFNamePlateFullBorderTemplate" mixin="DFNamePlateBorderTemplateMixin" ignoreParentScale="true" setAllPoints="true" useParentLevel="true" virtual="true">
<Layers>
<Layer level="BACKGROUND" textureSubLevel="-8">
<!-- Left -->
<Texture parentKey="Left" parentArray="Textures">
<Size x="1.0" />
<Anchors>
<Anchor point="TOPRIGHT" relativePoint="TOPLEFT" x="0" y="1.0" />
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT" x="0" y="-1.0" />
</Anchors>
<Color r="1" g="1" b="1" a="1"/>
</Texture>
<!-- Right -->
<Texture parentKey="Right" parentArray="Textures">
<Size x="1.0" />
<Anchors>
<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="0" y="1.0" />
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="0" y="-1.0" />
</Anchors>
<Color r="1" g="1" b="1" a="1"/>
</Texture>
<!-- Bottom -->
<Texture parentKey="Bottom" parentArray="Textures">
<Size y="1.0" />
<Anchors>
<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" />
<Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" />
</Anchors>
<Color r="1" g="1" b="1" a="1"/>
</Texture>
<!-- Top -->
<Texture parentKey="Top" parentArray="Textures">
<Size y="1.0" />
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" />
<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" />
</Anchors>
<Color r="1" g="1" b="1" a="1"/>
</Texture>
</Layer>
</Layers>
</Frame>
</Ui>
+42
View File
@@ -0,0 +1,42 @@
DFNamePlateBorderTemplateMixin = {};
local PixelUtil = PixelUtil or DFPixelUtil
function DFNamePlateBorderTemplateMixin:SetVertexColor(r, g, b, a)
for i, texture in ipairs(self.Textures) do
texture:SetVertexColor(r, g, b, a);
end
end
function DFNamePlateBorderTemplateMixin:SetBorderSizes(borderSize, borderSizeMinPixels, upwardExtendHeightPixels, upwardExtendHeightMinPixels)
self.borderSize = borderSize;
self.borderSizeMinPixels = borderSizeMinPixels;
self.upwardExtendHeightPixels = upwardExtendHeightPixels;
self.upwardExtendHeightMinPixels = upwardExtendHeightMinPixels;
end
function DFNamePlateBorderTemplateMixin:UpdateSizes()
local borderSize = self.borderSize or 1;
local minPixels = self.borderSizeMinPixels or 2;
local upwardExtendHeightPixels = self.upwardExtendHeightPixels or borderSize;
local upwardExtendHeightMinPixels = self.upwardExtendHeightMinPixels or minPixels;
PixelUtil.SetWidth(self.Left, borderSize, minPixels);
PixelUtil.SetPoint(self.Left, "TOPRIGHT", self, "TOPLEFT", 0, upwardExtendHeightPixels, 0, upwardExtendHeightMinPixels);
PixelUtil.SetPoint(self.Left, "BOTTOMRIGHT", self, "BOTTOMLEFT", 0, -borderSize, 0, minPixels);
PixelUtil.SetWidth(self.Right, borderSize, minPixels);
PixelUtil.SetPoint(self.Right, "TOPLEFT", self, "TOPRIGHT", 0, upwardExtendHeightPixels, 0, upwardExtendHeightMinPixels);
PixelUtil.SetPoint(self.Right, "BOTTOMLEFT", self, "BOTTOMRIGHT", 0, -borderSize, 0, minPixels);
PixelUtil.SetHeight(self.Bottom, borderSize, minPixels);
PixelUtil.SetPoint(self.Bottom, "TOPLEFT", self, "BOTTOMLEFT", 0, 0);
PixelUtil.SetPoint(self.Bottom, "TOPRIGHT", self, "BOTTOMRIGHT", 0, 0);
if self.Top then
PixelUtil.SetHeight(self.Top, borderSize, minPixels);
PixelUtil.SetPoint(self.Top, "BOTTOMLEFT", self, "TOPLEFT", 0, 0);
PixelUtil.SetPoint(self.Top, "BOTTOMRIGHT", self, "TOPRIGHT", 0, 0);
end
end
+1 -1
View File
@@ -1,6 +1,6 @@
local dversion = 249
local dversion = 250
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
+2
View File
@@ -1,6 +1,8 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
<Script file ="DFPixelUtil.lua"/>
<Include file ="DFFrames.xml"/>
<Script file="fw.lua"/>
<Script file="addon.lua"/>
<Script file="colors.lua"/>