Skip to content

Commit

Permalink
Open spellbook and bags while rebinding #111
Browse files Browse the repository at this point in the history
  • Loading branch information
haggen committed Sep 5, 2023
1 parent 6e893a0 commit e021719
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Fastbind/Fastbind.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ function FastbindFrameMixin:OnLeave()
self:ClearButton()
end

function FastbindFrameMixin:UpdatePanelsVisibility()
if self.isActive then
ShowUIPanel(SpellBookFrame)
OpenAllBags()
else
HideUIPanel(SpellBookFrame)
CloseAllBags()
end
end

function FastbindFrameMixin:Activate()
if self.isActive then
return
Expand All @@ -121,6 +131,7 @@ function FastbindFrameMixin:Activate()

self.isActive = true

self:UpdatePanelsVisibility()
self:HookBindables()

StaticPopup_Show(FASTBIND)
Expand All @@ -133,6 +144,7 @@ function FastbindFrameMixin:Deactivate()

self.isActive = false

self:UpdatePanelsVisibility()
self:ClearButton()

StaticPopup_Hide(FASTBIND)
Expand Down

0 comments on commit e021719

Please sign in to comment.