We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6a8809 commit feb817bCopy full SHA for feb817b
Modules/Skins/Addons/WeakAuras.lua
@@ -53,12 +53,22 @@ local function HandleComplexTexCoords(icon)
53
cLeft, cRight, cTop, cDown = ULx, ULy, LLx, LLy
54
end
55
56
+ local left, right, top, down = unpack(E.TexCoords)
57
if cLeft == 0 or cRight == 0 or cTop == 0 or cDown == 0 then
58
local width, height = cRight - cLeft, cDown - cTop
59
if width == height then
- F.CallMethod(self, "SetTexCoord", unpack(E.TexCoords))
60
+ F.CallMethod(self, "SetTexCoord", left, right, top, down)
61
+ elseif width > height then
62
+ F.CallMethod(
63
+ self,
64
+ "SetTexCoord",
65
+ left,
66
+ right,
67
+ top + cTop * (right - left),
68
+ top + cDown * (right - left)
69
+ )
70
else
- F.CallMethod(self, "SetTexCoord", E:CropRatio(width, height))
71
+ F.CallMethod(self, "SetTexCoord", left + cLeft * (down - top), left + cRight * (down - top), top, down)
72
73
74
F.CallMethod(self, "SetTexCoord", cLeft, cRight, cTop, cDown)
0 commit comments