Skip to content

Commit

Permalink
Use Wrath with Retail API check for gradients
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Flamanis authored Dec 7, 2022
1 parent 9cad7e3 commit 9a47340
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libs/DF/picture.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -343,4 +343,4 @@ detailsFramework:Mixin(ImageMetaFunctions, detailsFramework.ScriptHookMixin)
setmetatable(ImageObject, ImageMetaFunctions)

return ImageObject
end
end

0 comments on commit 9a47340

Please sign in to comment.