framework update

This commit is contained in:
Tercio Jose
2022-09-26 14:16:01 -03:00
parent a430220913
commit dd8da2dad1
3 changed files with 38 additions and 9 deletions
+11 -4
View File
@@ -352,10 +352,17 @@ DF:Mixin(ImageMetaFunctions, DF.SetPointMixin)
if (texture) then
if (type(texture) == "table") then
if (texture.gradient) then
ImageObject.image:SetColorTexture(1, 1, 1, 1)
local fromColor = DF:FormatColor("tablemembers", texture.fromColor)
local toColor = DF:FormatColor("tablemembers", texture.toColor)
ImageObject.image:SetGradient(texture.gradient, fromColor, toColor)
if (DF.IsDragonflight()) then
ImageObject.image:SetColorTexture(1, 1, 1, 1)
local fromColor = DF:FormatColor("tablemembers", texture.fromColor)
local toColor = DF:FormatColor("tablemembers", texture.toColor)
ImageObject.image:SetGradient(texture.gradient, fromColor, toColor)
else
local fromR, fromG, fromB, fromA = DF:ParseColors(texture.fromColor)
local toR, toG, toB, toA = DF:ParseColors(texture.toColor)
ImageObject.image:SetColorTexture(1, 1, 1, 1)
ImageObject.image:SetGradientAlpha(texture.gradient, fromR, fromG, fromB, fromA, toR, toG, toB, toA)
end
else
local r, g, b, a = DF:ParseColors(texture)
ImageObject.image:SetColorTexture(r, g, b, a)