From ae98782f296cba178ad01cadd18f242e787a077a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20K?= Date: Thu, 12 Nov 2020 22:22:23 +0100 Subject: [PATCH] Fix Progress Texture crash. Fix Icon desaturate issue. Add a TODO for future. --- WeakAuras/RegionTypes/Icon.lua | 1 + WeakAuras/RegionTypes/ProgressTexture.lua | 8 ++++---- WeakAurasOptions/RegionOptions/Icon.lua | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/WeakAuras/RegionTypes/Icon.lua b/WeakAuras/RegionTypes/Icon.lua index 0d5aa18137..84c42f59ec 100644 --- a/WeakAuras/RegionTypes/Icon.lua +++ b/WeakAuras/RegionTypes/Icon.lua @@ -446,6 +446,7 @@ local function modify(parent, region, data) iconPath = iconPath or self.displayIcon or "Interface\\Icons\\INV_Misc_QuestionMark" WeakAuras.SetTextureOrAtlas(self.icon, iconPath) + self.icon:SetDesaturated(data.desaturate) end function region:Scale(scalex, scaley) diff --git a/WeakAuras/RegionTypes/ProgressTexture.lua b/WeakAuras/RegionTypes/ProgressTexture.lua index 217862134f..b859464b2c 100644 --- a/WeakAuras/RegionTypes/ProgressTexture.lua +++ b/WeakAuras/RegionTypes/ProgressTexture.lua @@ -356,10 +356,10 @@ local function createTexCoord(texture) end function coord:Apply() - coord.texture:SetVertexOffset(UPPER_RIGHT_VERTEX, coord.URvx, coord.URvy); - coord.texture:SetVertexOffset(UPPER_LEFT_VERTEX, coord.ULvx, coord.ULvy); - coord.texture:SetVertexOffset(LOWER_RIGHT_VERTEX, coord.LRvx, coord.LRvy); - coord.texture:SetVertexOffset(LOWER_LEFT_VERTEX, coord.LLvx, coord.LLvy); + -- coord.texture:SetVertexOffset(UPPER_RIGHT_VERTEX, coord.URvx, coord.URvy); + -- coord.texture:SetVertexOffset(UPPER_LEFT_VERTEX, coord.ULvx, coord.ULvy); + -- coord.texture:SetVertexOffset(LOWER_RIGHT_VERTEX, coord.LRvx, coord.LRvy); + -- coord.texture:SetVertexOffset(LOWER_LEFT_VERTEX, coord.LLvx, coord.LLvy); coord.texture:SetTexCoord(coord.ULx, coord.ULy, coord.LLx, coord.LLy, coord.URx, coord.URy, coord.LRx, coord.LRy); end diff --git a/WeakAurasOptions/RegionOptions/Icon.lua b/WeakAurasOptions/RegionOptions/Icon.lua index bf48292ae7..eba31d15e7 100644 --- a/WeakAurasOptions/RegionOptions/Icon.lua +++ b/WeakAurasOptions/RegionOptions/Icon.lua @@ -223,6 +223,7 @@ local function createOptions(id, data) -- disabled = function() return not OptionsPrivate.Private.CanHaveDuration(data) end, -- hidden = function() return not data.cooldown end, -- }, + -- TODO Port retail OmniCC to allow this? -- cooldownTextDisabled = { -- type = "toggle", -- width = WeakAuras.normalWidth,