From f55a1ea3785318569afa4093f41c91a8245e5a23 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Tue, 26 Jul 2016 11:49:52 +0300 Subject: [PATCH] change deconstruct button logic --- ElvUI_SLE/modules/professions/deconstruct.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ElvUI_SLE/modules/professions/deconstruct.lua b/ElvUI_SLE/modules/professions/deconstruct.lua index 8ed8215..bbc71e8 100644 --- a/ElvUI_SLE/modules/professions/deconstruct.lua +++ b/ElvUI_SLE/modules/professions/deconstruct.lua @@ -251,14 +251,13 @@ function Pr:Construct_BagButton() Pr.DeconstructButton:StyleButton(nil, true) Pr.DeconstructButton:SetScript("OnClick", function(self,...) - if Pr.DeconstructMode == true then - Pr.DeconstructMode = false - Pr.DeconstructButton:SetNormalTexture("Interface\\ICONS\\INV_Rod_Cobalt") - ActionButton_HideOverlayGlow(Pr.DeconstructButton) - else - Pr.DeconstructMode = true + Pr.DeconstructMode = not Pr.DeconstructMode + if Pr.DeconstructMode then Pr.DeconstructButton:SetNormalTexture("Interface\\ICONS\\INV_Rod_EnchantedCobalt") if E.private.sle.professions.deconButton.buttonGlow then ActionButton_ShowOverlayGlow(Pr.DeconstructButton) end + else + Pr.DeconstructButton:SetNormalTexture("Interface\\ICONS\\INV_Rod_Cobalt") + ActionButton_HideOverlayGlow(Pr.DeconstructButton) end Pr.DeconstructButton.ttText2 = T.format(L["Allow you to disenchant/mill/prospect/unlock items.\nClick to toggle.\nCurrent state: %s."], Pr:GetDeconMode()) B.Tooltip_Show(self) -- 1.7.9.5