test desaturate

This commit is contained in:
Bunny67
2022-01-01 20:26:30 +03:00
parent 4fc3812c63
commit 5e69aa3ebe
3 changed files with 21 additions and 2 deletions
+18
View File
@@ -145,3 +145,21 @@ if not SmoothStatusBarMixin then
end
end
do
local texture_mt = getmetatable(CreateFrame("Frame"):CreateTexture()).__index
local setDesaturated = texture_mt.SetDesaturated
texture_mt.SetDesaturated = function(self, desaturated, ...)
self._isDesaturated = desaturated
return setDesaturated(self, desaturated, ...)
end
local setTexture = texture_mt.SetTexture
texture_mt.SetTexture = function(self, ...)
local isDesaturated = self._isDesaturated
local apply = setTexture(self, ...)
self:SetDesaturated(isDesaturated)
return apply
end
end