Thread Tools Display Modes
03-08-15, 04:02 AM   #1
Oniya
A Wyrmkin Dreamwalker
Join Date: Feb 2015
Posts: 57
Question Check if Bank Window is visible

How to check if Bank Window is visible (we can currently put items in bank)?

Problem is that some addons like LUA change Bank frames, so i cant check like

BankFrame:IsVisible()
  Reply With Quote
03-08-15, 05:55 AM   #2
Banknorris
A Chromatic Dragonspawn
 
Banknorris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 153
I use this:
Code:
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")
  Reply With Quote
03-18-15, 06:57 AM   #3
Oniya
A Wyrmkin Dreamwalker
Join Date: Feb 2015
Posts: 57
Originally Posted by Banknorris View Post
I use this:
Code:
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!
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Check if Bank Window is visible

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off