Use Wrath with Retail API check for gradients

Wrath does now have SetGradient, but I believe it is the 'old' version that does not accept the colormixins. Adding this check makes the fallback happen again which will correctly apply the gradient on current wrath.
This commit is contained in:
Flamanis
2022-12-07 16:01:03 -06:00
committed by GitHub
parent 9cad7e3185
commit 9a47340317
+2 -2
View File
@@ -300,7 +300,7 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
if (texture) then
if (type(texture) == "table") then
if (texture.gradient) then
if (detailsFramework.IsDragonflight() or ImageObject.image.SetGradient) then
if (detailsFramework.IsDragonflight() or detailsFramework.IsWotLKWowWithRetailAPI()) then
ImageObject.image:SetColorTexture(1, 1, 1, 1)
local fromColor = detailsFramework:FormatColor("tablemembers", texture.fromColor)
local toColor = detailsFramework:FormatColor("tablemembers", texture.toColor)
@@ -343,4 +343,4 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
setmetatable(ImageObject, ImageMetaFunctions)
return ImageObject
end
end