mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-06 13:40:00 +00:00
hoverbind: show grid when entering hoverbind mode
This commit is contained in:
+13
-1
@@ -859,11 +859,23 @@ pfUI:RegisterModule("actionbar", function ()
|
||||
-- create actionbars
|
||||
pfUI.bars = bars
|
||||
|
||||
function pfUI.bars:UpdateConfig()
|
||||
pfUI.bars.UpdateGrid = function(self, state)
|
||||
showgrid = state
|
||||
for j=1,12 do
|
||||
for i=1,12 do
|
||||
if pfUI.bars[i][j] then
|
||||
pfUI.bars[i][j].forceupdate = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
pfUI.bars.UpdateConfig = function(self)
|
||||
for i=1,12 do
|
||||
CreateActionBar(i)
|
||||
end
|
||||
end
|
||||
|
||||
pfUI.bars:UpdateConfig()
|
||||
|
||||
-- helper function to update by slot
|
||||
|
||||
@@ -43,6 +43,7 @@ pfUI:RegisterModule("hoverbind", function ()
|
||||
end)
|
||||
|
||||
pfUI.hoverbind:SetScript("OnShow", function()
|
||||
if pfUI.bars then pfUI.bars:UpdateGrid(1) end
|
||||
pfUI.gui:Hide()
|
||||
pfUI.hoverbind.edit:Show()
|
||||
|
||||
@@ -51,6 +52,7 @@ pfUI:RegisterModule("hoverbind", function ()
|
||||
end)
|
||||
|
||||
pfUI.hoverbind:SetScript("OnHide",function()
|
||||
if pfUI.bars then pfUI.bars:UpdateGrid(0) end
|
||||
pfUI.hoverbind.edit:Hide()
|
||||
pfUI.gui:Show()
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user