Skip to content

Commit

Permalink
addon states like retail
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Nov 14, 2023
1 parent 4afe948 commit ddd7e33
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions ElvUI/Classic/Modules/Skins/AddonManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,18 @@ function S:AddonList()
local checktex = checkbox:GetCheckedTexture()
if not enabled and checkall == 1 then
checktex:SetVertexColor(0.3, 0.3, 0.3)
checktex:SetDesaturated(false)
checktex:SetDesaturated(true)
checktex:Show()
elseif checkstate == 0 then
elseif not checkstate or checkstate == 0 then
checktex:Hide()
elseif checkstate == 1 or reason == 'DEP_DISABLED' then
checktex:SetVertexColor(0.6, 0.6, 0.6)
checktex:SetDesaturated(true)
checktex:Show()
elseif checkstate == 2 then
checktex:SetVertexColor(unpack(E.media.rgbvaluecolor))
checktex:SetDesaturated(false)
checktex:Show()
end
end
end
Expand Down
12 changes: 10 additions & 2 deletions ElvUI/Wrath/Modules/Skins/AddonManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,18 @@ function S:AddonList()
local checktex = checkbox:GetCheckedTexture()
if not enabled and checkall == 1 then
checktex:SetVertexColor(0.3, 0.3, 0.3)
checktex:SetDesaturated(false)
checktex:SetDesaturated(true)
checktex:Show()
elseif checkstate == 0 then
elseif not checkstate or checkstate == 0 then
checktex:Hide()
elseif checkstate == 1 or reason == 'DEP_DISABLED' then
checktex:SetVertexColor(0.6, 0.6, 0.6)
checktex:SetDesaturated(true)
checktex:Show()
elseif checkstate == 2 then
checktex:SetVertexColor(unpack(E.media.rgbvaluecolor))
checktex:SetDesaturated(false)
checktex:Show()
end
end
end
Expand Down

0 comments on commit ddd7e33

Please sign in to comment.