Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Fix Progress Texture crash.
Browse files Browse the repository at this point in the history
Fix Icon desaturate issue.
Add a TODO for future.
  • Loading branch information
Maczuga committed Nov 12, 2020
1 parent 28215c0 commit ae98782
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions WeakAuras/RegionTypes/Icon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions WeakAuras/RegionTypes/ProgressTexture.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions WeakAurasOptions/RegionOptions/Icon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ae98782

Please sign in to comment.