From 3d1fb3a1d6fa822aedf0951777c854c023bdb819 Mon Sep 17 00:00:00 2001 From: Rubgrsch Date: Mon, 28 Oct 2024 06:53:09 +0800 Subject: [PATCH 1/3] Merge #1406 Add some M+ debuffs --- ElvUI/Mainline/Filters/Filters.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ElvUI/Mainline/Filters/Filters.lua b/ElvUI/Mainline/Filters/Filters.lua index a4f7555b9e..a0f4472ef1 100644 --- a/ElvUI/Mainline/Filters/Filters.lua +++ b/ElvUI/Mainline/Filters/Filters.lua @@ -821,6 +821,8 @@ G.unitframe.aurafilters.RaidDebuffs = { [272834] = List(), -- Viscous Slobber [257169] = List(), -- Terrifying Roar [272713] = List(), -- Crushing Slam + [257459] = List(), -- On the Hook + [463182] = List(), -- Fiery Ricochet -- Grim Batol [449885] = List(), -- Shadow Gale 1 [461513] = List(), -- Shadow Gale 2 From 0a1dd94ba43e13917651a57c8b8090fc85334dd6 Mon Sep 17 00:00:00 2001 From: Merathilis Date: Mon, 28 Oct 2024 15:23:40 +0100 Subject: [PATCH 2/3] Don't use our skinning function on the CurrencyTransferLogToggleButton it taints. Keep the code commented out as reminder --- ElvUI/Mainline/Modules/Skins/Character.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElvUI/Mainline/Modules/Skins/Character.lua b/ElvUI/Mainline/Modules/Skins/Character.lua index 25a1e5a4e7..63225e0fb3 100644 --- a/ElvUI/Mainline/Modules/Skins/Character.lua +++ b/ElvUI/Mainline/Modules/Skins/Character.lua @@ -429,7 +429,7 @@ function S:Blizzard_UIPanels_Game() _G.TokenFramePopup:Point('TOPLEFT', _G.TokenFrame, 'TOPRIGHT', 3, -28) S:HandleDropDownBox(_G.TokenFrame.filterDropdown) - S:HandleButton(_G.TokenFrame.CurrencyTransferLogToggleButton) + --S:HandleButton(_G.TokenFrame.CurrencyTransferLogToggleButton) -- No no no, this taints _G.TokenFrame.CurrencyTransferLogToggleButton.NormalTexture:SetTexture(E.Media.Textures.Copy) _G.TokenFrame.CurrencyTransferLogToggleButton.PushedTexture:SetTexture(E.Media.Textures.Copy) From 1ead8d160ed93f2a53973b99ccd6024134afa712 Mon Sep 17 00:00:00 2001 From: Simpy Date: Mon, 28 Oct 2024 20:11:50 -0400 Subject: [PATCH 3/3] simplify addonlist skin --- ElvUI/Cata/Modules/Skins/AddonManager.lua | 72 +++++-------------- ElvUI/Classic/Modules/Skins/AddonManager.lua | 70 +++++------------- ElvUI/Mainline/Modules/Skins/AddonManager.lua | 67 ++++------------- 3 files changed, 51 insertions(+), 158 deletions(-) diff --git a/ElvUI/Cata/Modules/Skins/AddonManager.lua b/ElvUI/Cata/Modules/Skins/AddonManager.lua index 6547b92896..8ad7c49a5c 100644 --- a/ElvUI/Cata/Modules/Skins/AddonManager.lua +++ b/ElvUI/Cata/Modules/Skins/AddonManager.lua @@ -5,8 +5,6 @@ local _G = _G local unpack = unpack local hooksecurefunc = hooksecurefunc -local UIDropDownMenu_GetSelectedValue = UIDropDownMenu_GetSelectedValue - local GetAddOnInfo = C_AddOns.GetAddOnInfo local GetNumAddOns = C_AddOns.GetNumAddOns @@ -15,26 +13,20 @@ function S:AddonList() local AddonList = _G.AddonList local maxShown = _G.MAX_ADDONS_DISPLAYED - local AddonCharacterDropDown = _G.AddonCharacterDropDown S:HandleFrame(AddonList, true) S:HandleButton(AddonList.EnableAllButton, true) S:HandleButton(AddonList.DisableAllButton, true) S:HandleButton(AddonList.OkayButton, true) S:HandleButton(AddonList.CancelButton, true) - S:HandleDropDownBox(AddonCharacterDropDown, 165) S:HandleScrollBar(_G.AddonListScrollFrameScrollBar) + S:HandleDropDownBox(_G.AddonCharacterDropDown) S:HandleCheckBox(_G.AddonListForceLoad) _G.AddonListForceLoad:Size(26) S:HandleFrame(_G.AddonListScrollFrame, true, nil, -14, 0, 0, -1) - for i = 1, maxShown do - S:HandleCheckBox(_G['AddonListEntry'..i..'Enabled'], nil, nil, true) - S:HandleButton(_G['AddonListEntry'..i].LoadAddonButton) - end - hooksecurefunc('AddonList_Update', function() local numEntrys = GetNumAddOns() for i = 1, maxShown do @@ -43,64 +35,38 @@ function S:AddonList() local entry = _G['AddonListEntry'..i] local entryTitle = _G['AddonListEntry'..i..'Title'] local checkbox = _G['AddonListEntry'..i..'Enabled'] - local name, title, _, loadable, reason = GetAddOnInfo(index) - - -- Get the character from the current list (nil is all characters) - local checkall - local character = UIDropDownMenu_GetSelectedValue(AddonCharacterDropDown) - if character == true then - character = nil - else - checkall = E:GetAddOnEnableState(index) - end - - local checkstate = E:GetAddOnEnableState(index, character) - local enabled = checkstate > 0 + local _, _, _, _, reason = GetAddOnInfo(index) - entryTitle:SetFontObject('ElvUIFontNormal') - entry.Status:SetFontObject('ElvUIFontSmall') - entry.Reload:SetFontObject('ElvUIFontSmall') - entry.Reload:SetTextColor(1.0, 0.3, 0.3) - entry.LoadAddonButton.Text:SetFontObject('ElvUIFontSmall') + if not entry.IsSkinned then + S:HandleCheckBox(_G['AddonListEntry'..i..'Enabled'], nil, nil, true) + S:HandleButton(entry.LoadAddonButton) - local enabledForSome = not character and checkstate == 1 - local disabled = not enabled or enabledForSome + entryTitle:SetFontObject('ElvUIFontNormal') + entry.Status:SetFontObject('ElvUIFontSmall') + entry.Reload:SetFontObject('ElvUIFontSmall') + entry.Reload:SetTextColor(1.0, 0.3, 0.3) + entry.LoadAddonButton.Text:SetFontObject('ElvUIFontSmall') - if disabled then - entry.Status:SetTextColor(0.4, 0.4, 0.4) - else - entry.Status:SetTextColor(0.7, 0.7, 0.7) - end - - if disabled or reason == 'DEP_DISABLED' then - entryTitle:SetText(E:StripString(title or name, true)) + entry.IsSkinned = true end - if enabledForSome then - entryTitle:SetTextColor(0.5, 0.5, 0.5) - elseif enabled and (loadable or reason == 'DEP_DEMAND_LOADED' or reason == 'DEMAND_LOADED') then - entryTitle:SetTextColor(0.9, 0.9, 0.9) - elseif enabled and reason ~= 'DEP_DISABLED' then - entryTitle:SetTextColor(1.0, 0.2, 0.2) + local checkstate = E:GetAddOnEnableState(index) + if checkstate == 2 then + entry.Status:SetTextColor(0.7, 0.7, 0.7) else - entryTitle:SetTextColor(0.3, 0.3, 0.3) + entry.Status:SetTextColor(0.4, 0.4, 0.4) end local checktex = checkbox:GetCheckedTexture() - if not enabled and checkall == 1 then - checktex:SetVertexColor(0.3, 0.3, 0.3) - checktex:SetDesaturated(true) - checktex:Show() - elseif not checkstate or checkstate == 0 then - checktex:Hide() - elseif checkstate == 1 or reason == 'DEP_DISABLED' then + if reason == 'DEP_DISABLED' then checktex:SetVertexColor(0.6, 0.6, 0.6) checktex:SetDesaturated(true) - checktex:Show() + elseif checkstate == 1 then + checktex:SetVertexColor(1, 0.8, 0.1) + checktex:SetDesaturated(false) elseif checkstate == 2 then checktex:SetVertexColor(unpack(E.media.rgbvaluecolor)) checktex:SetDesaturated(false) - checktex:Show() end end end diff --git a/ElvUI/Classic/Modules/Skins/AddonManager.lua b/ElvUI/Classic/Modules/Skins/AddonManager.lua index 4bcd42f9cd..e2cc8667f6 100644 --- a/ElvUI/Classic/Modules/Skins/AddonManager.lua +++ b/ElvUI/Classic/Modules/Skins/AddonManager.lua @@ -5,8 +5,6 @@ local _G = _G local unpack = unpack local hooksecurefunc = hooksecurefunc -local UIDropDownMenu_GetSelectedValue = UIDropDownMenu_GetSelectedValue - local GetAddOnInfo = C_AddOns.GetAddOnInfo local GetNumAddOns = C_AddOns.GetNumAddOns @@ -15,7 +13,6 @@ function S:AddonList() local AddonList = _G.AddonList local maxShown = _G.MAX_ADDONS_DISPLAYED - local AddonListDropdown = _G.AddonList.Dropdown S:HandleFrame(AddonList, true) S:HandleButton(AddonList.EnableAllButton, true) @@ -30,11 +27,6 @@ function S:AddonList() S:HandleFrame(_G.AddonListScrollFrame, true, nil, -14, 0, 0, -1) - for i = 1, maxShown do - S:HandleCheckBox(_G['AddonListEntry'..i..'Enabled'], nil, nil, true) - S:HandleButton(_G['AddonListEntry'..i].LoadAddonButton) - end - hooksecurefunc('AddonList_Update', function() local numEntrys = GetNumAddOns() for i = 1, maxShown do @@ -43,64 +35,38 @@ function S:AddonList() local entry = _G['AddonListEntry'..i] local entryTitle = _G['AddonListEntry'..i..'Title'] local checkbox = _G['AddonListEntry'..i..'Enabled'] - local name, title, _, loadable, reason = GetAddOnInfo(index) - - -- Get the character from the current list (nil is all characters) - local checkall - local character = UIDropDownMenu_GetSelectedValue(AddonListDropdown) - if character == true then - character = nil - else - checkall = E:GetAddOnEnableState(index) - end - - local checkstate = E:GetAddOnEnableState(index, character) - local enabled = checkstate > 0 + local _, _, _, _, reason = GetAddOnInfo(index) - entryTitle:SetFontObject('ElvUIFontNormal') - entry.Status:SetFontObject('ElvUIFontSmall') - entry.Reload:SetFontObject('ElvUIFontSmall') - entry.Reload:SetTextColor(1.0, 0.3, 0.3) - entry.LoadAddonButton.Text:SetFontObject('ElvUIFontSmall') + if not entry.IsSkinned then + S:HandleCheckBox(_G['AddonListEntry'..i..'Enabled'], nil, nil, true) + S:HandleButton(entry.LoadAddonButton) - local enabledForSome = not character and checkstate == 1 - local disabled = not enabled or enabledForSome + entryTitle:SetFontObject('ElvUIFontNormal') + entry.Status:SetFontObject('ElvUIFontSmall') + entry.Reload:SetFontObject('ElvUIFontSmall') + entry.Reload:SetTextColor(1.0, 0.3, 0.3) + entry.LoadAddonButton.Text:SetFontObject('ElvUIFontSmall') - if disabled then - entry.Status:SetTextColor(0.4, 0.4, 0.4) - else - entry.Status:SetTextColor(0.7, 0.7, 0.7) - end - - if disabled or reason == 'DEP_DISABLED' then - entryTitle:SetText(E:StripString(title or name, true)) + entry.IsSkinned = true end - if enabledForSome then - entryTitle:SetTextColor(0.5, 0.5, 0.5) - elseif enabled and (loadable or reason == 'DEP_DEMAND_LOADED' or reason == 'DEMAND_LOADED') then - entryTitle:SetTextColor(0.9, 0.9, 0.9) - elseif enabled and reason ~= 'DEP_DISABLED' then - entryTitle:SetTextColor(1.0, 0.2, 0.2) + local checkstate = E:GetAddOnEnableState(index) + if checkstate == 2 then + entry.Status:SetTextColor(0.7, 0.7, 0.7) else - entryTitle:SetTextColor(0.3, 0.3, 0.3) + entry.Status:SetTextColor(0.4, 0.4, 0.4) end local checktex = checkbox:GetCheckedTexture() - if not enabled and checkall == 1 then - checktex:SetVertexColor(0.3, 0.3, 0.3) - checktex:SetDesaturated(true) - checktex:Show() - elseif not checkstate or checkstate == 0 then - checktex:Hide() - elseif checkstate == 1 or reason == 'DEP_DISABLED' then + if reason == 'DEP_DISABLED' then checktex:SetVertexColor(0.6, 0.6, 0.6) checktex:SetDesaturated(true) - checktex:Show() + elseif checkstate == 1 then + checktex:SetVertexColor(1, 0.8, 0.1) + checktex:SetDesaturated(false) elseif checkstate == 2 then checktex:SetVertexColor(unpack(E.media.rgbvaluecolor)) checktex:SetDesaturated(false) - checktex:Show() end end end diff --git a/ElvUI/Mainline/Modules/Skins/AddonManager.lua b/ElvUI/Mainline/Modules/Skins/AddonManager.lua index fdca96be77..808902df7c 100644 --- a/ElvUI/Mainline/Modules/Skins/AddonManager.lua +++ b/ElvUI/Mainline/Modules/Skins/AddonManager.lua @@ -5,7 +5,6 @@ local _G = _G local unpack = unpack local hooksecurefunc = hooksecurefunc -local UIDropDownMenu_GetSelectedValue = UIDropDownMenu_GetSelectedValue local GetAddOnInfo = C_AddOns.GetAddOnInfo local function HandleButton(entry, addonIndex) @@ -13,72 +12,34 @@ local function HandleButton(entry, addonIndex) S:HandleCheckBox(entry.Enabled) S:HandleButton(entry.LoadAddonButton) - entry.IsSkinned = true - end + entry.Title:SetFontObject('ElvUIFontNormal') + entry.Status:SetFontObject('ElvUIFontSmall') + entry.Reload:SetFontObject('ElvUIFontSmall') + entry.Reload:SetTextColor(1.0, 0.3, 0.3) + entry.LoadAddonButton.Text:SetFontObject('ElvUIFontSmall') - local checkall -- Get the character from the current list (nil is all characters) - local character = UIDropDownMenu_GetSelectedValue(_G.AddonList.Dropdown) - if character == true then - character = nil - else - checkall = E:GetAddOnEnableState(addonIndex) + entry.IsSkinned = true end - entry.Title:SetFontObject('ElvUIFontNormal') - entry.Status:SetFontObject('ElvUIFontSmall') - entry.Reload:SetFontObject('ElvUIFontSmall') - entry.Reload:SetTextColor(1.0, 0.3, 0.3) - entry.LoadAddonButton.Text:SetFontObject('ElvUIFontSmall') - - local checkstate = E:GetAddOnEnableState(addonIndex, character) - local enabledForSome = not character and checkstate == 1 - local enabled = checkstate > 0 - local disabled = not enabled or enabledForSome - - if disabled then - entry.Status:SetTextColor(0.4, 0.4, 0.4) - else + local checkstate = E:GetAddOnEnableState(addonIndex) + if checkstate == 2 then entry.Status:SetTextColor(0.7, 0.7, 0.7) - end - - local name, title, _, loadable, reason = GetAddOnInfo(addonIndex) - if disabled or reason == 'DEP_DISABLED' then - entry.Title:SetText(E:StripString(title or name, true)) - end - - if enabledForSome then - entry.Title:SetTextColor(0.5, 0.5, 0.5) - elseif enabled and (loadable or reason == 'DEP_DEMAND_LOADED' or reason == 'DEMAND_LOADED') then - entry.Title:SetTextColor(0.9, 0.9, 0.9) - elseif enabled and reason ~= 'DEP_DISABLED' then - entry.Title:SetTextColor(1.0, 0.2, 0.2) else - entry.Title:SetTextColor(0.3, 0.3, 0.3) + entry.Status:SetTextColor(0.4, 0.4, 0.4) end + local _, _, _, _, reason = GetAddOnInfo(addonIndex) local checktex = entry.Enabled:GetCheckedTexture() - checktex.SetVertexColor = nil - checktex.SetDesaturated = nil - - if not enabled and checkall == 1 then - checktex:SetVertexColor(0.3, 0.3, 0.3) - checktex:SetDesaturated(true) - checktex:Show() - elseif not checkstate or checkstate == 0 then - checktex:Hide() - elseif checkstate == 1 or reason == 'DEP_DISABLED' then + if reason == 'DEP_DISABLED' then checktex:SetVertexColor(0.6, 0.6, 0.6) checktex:SetDesaturated(true) - checktex:Show() + elseif checkstate == 1 then + checktex:SetVertexColor(1, 0.8, 0.1) + checktex:SetDesaturated(false) elseif checkstate == 2 then checktex:SetVertexColor(unpack(E.media.rgbvaluecolor)) checktex:SetDesaturated(false) - checktex:Show() end - - -- TriStateCheckbox_SetState interferes (checktex all share the same name) - checktex.SetVertexColor = E.noop - checktex.SetDesaturated = E.noop end function S:AddonList()