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

Commit

Permalink
fix ExtraButton staying visible due to cooldown SetAlpha issue
Browse files Browse the repository at this point in the history
  • Loading branch information
brittyazel committed Jan 19, 2019
1 parent 15bdacd commit 9edd107
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
14 changes: 3 additions & 11 deletions Neuron-Startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ function Neuron:RegisterGUI()
LOCKBAR = false,
TOOLTIPS = true,
BINDTEXT = true,
RANGEIND = true,
CDTEXT = true,
CDALPHA = true },
COUNTTEXT = true,},
false, 65)


Expand All @@ -122,9 +120,7 @@ function Neuron:RegisterGUI()
LOCKBAR = false,
TOOLTIPS = true,
BINDTEXT = true,
RANGEIND = true,
CDTEXT = true,
CDALPHA = true },
COUNTTEXT = true,},
false, 65)


Expand Down Expand Up @@ -156,11 +152,7 @@ function Neuron:RegisterGUI()
UPCLICKS = true,
DOWNCLICKS = true,
HIDDEN = true,
LOCKBAR = false,
BINDTEXT = true,
RANGEIND = true,
CDTEXT = true,
CDALPHA = true },
LOCKBAR = false, },
false, 65)

--Neuron Menu Bar
Expand Down
5 changes: 3 additions & 2 deletions Objects/BUTTON.lua
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,10 @@ function BUTTON:SetCooldownTimer(start, duration, enable, showCountdownTimer, mo
if not charges or charges == maxCharges or maxCharges == 1 then --if ability does not support charges then clear the charge cooldown frame
CooldownFrame_Clear(self.iconframechargecooldown)
end

end

--this is important for items like the ExtraActionButton who use Alpha to show and hide itself (to avoid in-combat restrictions). Without it the button would stay visible
self:SetObjectVisibility()
end


Expand Down Expand Up @@ -427,7 +429,6 @@ function BUTTON:SetData(bar)
self:SetScale(bar.data.scale)
end

--self:SetFrameLevel(4)
self.iconframe:SetFrameLevel(2)
self.iconframecooldown:SetFrameLevel(3)
self.iconframechargecooldown:SetFrameLevel(3)
Expand Down
2 changes: 0 additions & 2 deletions Objects/EXTRABTN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,9 @@ function EXTRABTN:SetObjectVisibility(show)

if HasExtraActionBar() or show then --set alpha instead of :Show or :Hide, to avoid taint and to allow the button to appear in combat
self:SetAlpha(1)

elseif not Neuron.buttonEditMode and not Neuron.barEditMode and not Neuron.bindingMode then
self:SetAlpha(0)
end

end


Expand Down

0 comments on commit 9edd107

Please sign in to comment.