Bugfixes: Removed retail API calls, ran linting script and static analysis.

This commit is contained in:
Bluewhale1337
2026-07-25 00:42:46 +02:00
parent 390067cdbd
commit c51cfa3f73
15 changed files with 65 additions and 28 deletions
+17 -3
View File
@@ -72,6 +72,7 @@ function E:Point(obj, arg1, arg2, arg3, arg4, arg5)
end
function E:SetOutside(obj, anchor, xOffset, yOffset, anchor2)
if type(obj) ~= "table" then return end
xOffset = xOffset or E.Border
yOffset = yOffset or E.Border
anchor = anchor or obj:GetParent()
@@ -86,6 +87,7 @@ function E:SetOutside(obj, anchor, xOffset, yOffset, anchor2)
end
function E:SetInside(obj, anchor, xOffset, yOffset, anchor2)
if type(obj) ~= "table" then return end
xOffset = xOffset or E.Border
yOffset = yOffset or E.Border
anchor = anchor or obj:GetParent()
@@ -100,6 +102,7 @@ function E:SetInside(obj, anchor, xOffset, yOffset, anchor2)
end
function E:SetTemplate(f, t, glossTex, ignoreUpdates, forcePixelMode, isUnitFrameElement)
if not f then return end
GetTemplate(t, isUnitFrameElement)
if t then
@@ -186,9 +189,18 @@ end
function E:CreateBackdrop(f, t, tex, ignoreUpdates, forcePixelMode, isUnitFrameElement)
if not t then t = "Default" end
local parent = f.IsObjectType and f:IsObjectType("Texture") and f:GetParent() or f
local b = CreateFrame("Frame", nil, parent)
local parent = f
if f.IsObjectType and not f:IsObjectType("Frame") then
parent = f:GetParent()
end
if type(parent) == "table" and not parent[0] then
parent = f.GetParent and f:GetParent() or UIParent
end
if parent and parent.IsObjectType and not parent:IsObjectType("Frame") then
parent = UIParent
end
local b = f.backdrop or CreateFrame("Frame", nil, parent)
if f.forcePixelMode or forcePixelMode then
E:SetOutside(b, nil, E.mult, E.mult)
else
@@ -288,6 +300,8 @@ function E:FontTemplate(fs, font, fontSize, fontStyle)
end
function E:StyleButton(button, noHover, noPushed, noChecked)
if not button then return end
if button.SetHighlightTexture and not button.hover and not noHover then
local hover = button:CreateTexture()
hover:SetTexture(1, 1, 1, 0.3)