local f = CreateFrame("Frame")
local Bank_Window_Is_Visible
f:SetScript("OnEvent",function(self,event,...)
if event=="BANKFRAME_OPENED" then
Bank_Window_Is_Visible = true
elseif event=="BANKFRAME_CLOSED" then
Bank_Window_Is_Visible = false
end
end
f:RegisterEvent("BANKFRAME_OPENED")
f:RegisterEvent("BANKFRAME_CLOSED")
local f = CreateFrame("Frame")
local Bank_Window_Is_Visible
f:SetScript("OnEvent",function(self,event,...)
if event=="BANKFRAME_OPENED" then
Bank_Window_Is_Visible = true
elseif event=="BANKFRAME_CLOSED" then
Bank_Window_Is_Visible = false
end
end
f:RegisterEvent("BANKFRAME_OPENED")
f:RegisterEvent("BANKFRAME_CLOSED")
haven't thought we can use lua events for this, thanks a lot!