How to find out how many chat windows/tabs
Are there any functions to find out how many chat windows or tabs are opened or do you just have to go with something like ChatFrame#:IsShown() ?
|
Read through the code of rChat:
http://code.google.com/p/rothui/sour...e/trunk/rChat/ NUM_CHAT_WINDOWS has the max number of chatframes. Available at loadup. There is another function that can return the actual number of active chatframes but that is available after loadup only. Blizzard ChatFrame code is in FrameXML/FloatingChatFrame.lua / .xml Check for "FCF_GetNumActiveChatFrames()" in https://github.com/tekkub/wow-ui-sou...gChatFrame.lua |
This is a function I grabbed from the blizz chatframes file and tweaked it for my purposes somewhat. You can ignore the infoPanel sections as that is something I use so that my chat frame addons can talk to each other by validating that flag to know whether it can use that chat frame or not for their own uses.
Code:
--[[ Generate a list of active frames for locating an available frame to use ]]-- Code:
-- If blizz is updating the chat windows then we want in so we can do our stuff |
All times are GMT -6. The time now is 07:53 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI