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

Commit

Permalink
Try to fix #312
Browse files Browse the repository at this point in the history
  • Loading branch information
brittyazel committed May 10, 2020
1 parent 36292c1 commit f0d19e8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
13 changes: 0 additions & 13 deletions Neuron.lua
Original file line number Diff line number Diff line change
Expand Up @@ -556,19 +556,6 @@ function Neuron:UpdateStanceStrings()
end
end



function Neuron:ToggleButtonGrid(show)
for _,bar in pairs(Neuron.BARIndex) do
if bar.barType == "ActionBar" or bar.barType == "PetBar" then
for _, button in pairs(bar.buttons) do
button:UpdateObjectVisibility(show)
end
end
end
end


function Neuron:ToggleMainMenu()
---need to run the command twice for some reason. The first one only seems to open the Interface panel
InterfaceOptionsFrame_OpenToCategory("Neuron");
Expand Down
13 changes: 11 additions & 2 deletions Objects/ACTIONBUTTON.lua
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,20 @@ function ACTIONBUTTON:ACTIVE_TALENT_GROUP_CHANGED()
end

function ACTIONBUTTON:ACTIONBAR_SHOWGRID()
Neuron:ToggleButtonGrid(true)
local show = true
if self.barLock and self.barLockAlt and not IsAltKeyDown() then
show = false
elseif self.barLock and self.barLockCtrl and not IsControlKeyDown() then
show = false
elseif self.barLock and self.barLockShift and not IsShiftKeyDown() then
show = false
end

self:UpdateObjectVisibility(show)
end

function ACTIONBUTTON:ACTIONBAR_HIDEGRID()
Neuron:ToggleButtonGrid()
self:UpdateObjectVisibility()
end

function ACTIONBUTTON:UPDATE_MACROS()
Expand Down
4 changes: 2 additions & 2 deletions Objects/ACTIONBUTTON_DragAndDrop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function ACTIONBUTTON:OnDragStart()

end

Neuron:ToggleButtonGrid(true) --show the button grid if we have something picked up (i.e if macroDrag contains something)
self:ACTIONBAR_SHOWGRID() --show the button grid if we have something picked up (i.e if macroDrag contains something)
end

--This is the function that fires when a button is receiving a dragged item
Expand Down Expand Up @@ -126,7 +126,7 @@ function ACTIONBUTTON:OnReceiveDrag()

if macroCache[1] then
self:OnDragStart(macroCache) --If we picked up a new ability after dropping this one we have to manually call OnDragStart
Neuron:ToggleButtonGrid(true)
self:ACTIONBAR_SHOWGRID() --show the button grid if we have something picked up (i.e if macroDrag contains something)
else
SetCursor(nil)
ClearCursor() --if we did not pick up a new spell, clear the cursor
Expand Down

0 comments on commit f0d19e8

Please sign in to comment.