test desaturate

This commit is contained in:
Bunny67
2022-01-05 00:09:42 +03:00
parent d6de7c391d
commit d9af2978fc
3 changed files with 37 additions and 20 deletions
+1 -20
View File
@@ -143,23 +143,4 @@ if not SmoothStatusBarMixin then
self.lastSmoothedMin = min;
self.lastSmoothedMax = max;
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
end