From e0217197897935acb0a3b4ffa182103be7fbb309 Mon Sep 17 00:00:00 2001 From: Arthur Date: Mon, 4 Sep 2023 23:17:32 -0300 Subject: [PATCH] Open spellbook and bags while rebinding #111 --- src/Fastbind/Fastbind.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Fastbind/Fastbind.lua b/src/Fastbind/Fastbind.lua index 8fc46c2..d41b4ed 100644 --- a/src/Fastbind/Fastbind.lua +++ b/src/Fastbind/Fastbind.lua @@ -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 @@ -121,6 +131,7 @@ function FastbindFrameMixin:Activate() self.isActive = true + self:UpdatePanelsVisibility() self:HookBindables() StaticPopup_Show(FASTBIND) @@ -133,6 +144,7 @@ function FastbindFrameMixin:Deactivate() self.isActive = false + self:UpdatePanelsVisibility() self:ClearButton() StaticPopup_Hide(FASTBIND)