Thread Tools Display Modes
Unread 06-21-10, 08:20 AM   #1
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
Chat Frames and 3.3.5

Well looks like they did a mega change to the chat frames for the next patch. And try as I might to get the chat infopanels working I can't figure out why they won't do what I want.

It seems they now have the buttons in a frame of their own which seems to have the ability to be docked in either side of the chat frame. However, trying to dock them in code to a side I want doesn't seem to consistently work rofl so I am guessing the frames control it themselves based on where they are positioned.

Now, the big bugbear is that with the way our chatframes are currently coded in nUI the buttons don't seem to want to sit in the buttonframe. I even removed all the code that changed what the buttons did and where with no luck. I also tried setting the classic format to see if at least we could keep the chat setup like the old way until we figure things out but nada still doesn't quite work.

An example screenshot or two shows the combatlog window with no changes by myself so currently as Scott has coded it. The first is with the new chat frame format and the second is using the classic option. There are differences but both don't work with our infopanel now. And the third is my attempt at changing my nUI_InfoPanel_Chat plugin to work with it all.

Apparently the old way of creating a chat frame is no longer the way to go but instead you use a CreateNewWindow function or something. I have yet to investigate this avenue yet. With the limitation of 10 chat frames available I may simply change that plugin to anchor an existing chatframe to the right hand side. Needless to say my guildchat plugin may have to be totally rewritten as a non chatframe plugin but a scrolling message frame instead but will see.

Anyway, here's the screenshots.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_062110_145511.jpg
Views:	900
Size:	261.9 KB
ID:	4448  Click image for larger version

Name:	WoWScrnShot_062110_150937.jpg
Views:	818
Size:	257.8 KB
ID:	4449  Click image for larger version

Name:	WoWScrnShot_062110_140943.jpg
Views:	781
Size:	282.6 KB
ID:	4450  
__________________
Xrystal is offline  
Unread 06-21-10, 08:55 AM   #2
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Yeah -- I need to get a version of nUI5 on the PTR and start working the chat frame changes. Sounds like a plan for this week if I can after work, otherwise this weekend.

I'll holler as soon as I figure out how to make it work.

Have you tried unpacking the FrameXML and looking at Blizz's code for the chat frames?
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 06-21-10, 09:26 AM   #3
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
Yeah, I've been trying to figure out which file is which rofl.

They have FloatingChatFrame and ChatFrame and ChatConfigFrame

All I managed to figure out to get nUI to work was to change nUI_ChatFrame.lua to reflect the new buttonframe buttons.

The chat system in general has been reworked considerably with watchframe like collapsible chatframes.

Frames I managed to locate were as follows:
ChatFrame5
ChatFrame5Tab
ChatFrame5Background > I couldn't see this with FrameStack but it isn't nil
ChatFrame5ButtonFrame
ChatFrame5ButtonFrameBottomButton
ChatFrame5ButtonFrameDownButton
ChatFrame5ButtonFrameUpButton
ChatFrame5ButtonFrameMinimizeButton
__________________
Xrystal is offline  
Unread 06-22-10, 07:16 AM   #4
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
Uggg .. 3.3.5 out already rofl ..

Well managed to find out how to create and remove a new frame which will be useful for my plugins but not so for the other chat frames.

ADDON_LOADED
Code:
local chatFrame = FCF_OpenNewWindow(NameOnTabText)
PLAYER_LOGOUT
Code:
if ( chatFrame ) then
     CURRENT_CHAT_FRAME_ID = chatFrame:GetID()
     FCF_ToggleLock()
     FCF_Close(chatFrame)
end
Note also that doing it this way adds the name into the chat-cache.txt file for the character which I couldn't figure out before. This should help us to use blizz settings or override as we choose as we can simply let blizz do the settings and not do anything else or we can override it after the fact.
__________________
Xrystal is offline  
Unread 06-22-10, 07:38 AM   #5
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Yeah -- I never even got a chance to look at nUI5 on the 3.3.5 PTR because I was investing all my time in nUI6. I'm going to have to jump all over that this afternoon. I strongly suspect nUI5 is gonna puke on the patch.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 06-22-10, 08:29 AM   #6
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
Yeah, but fortunately the only thing that broke nUI was the ButtonFrame addition which is easy to fix.

Getting the chatframes more fitted to nUI is the thing thats messing me up.


Okay update. Don't use ADDON_UPDATE to create the new chatframe... or VARIABLES_LOADED. It just doesn't work rofl.

I'm not sure which one is best yet but these allow you to create a new window on the fly it seems.

"UPDATE_CHAT_WINDOWS"
"UPDATE_FLOATING_CHAT_WINDOWS"

Code:
	chatFrame = FCF_OpenNewWindow("XChatFrame")
	local chatFrameButtonFrame = _G[chatFrame:GetName().."ButtonFrame"]
	local chatFrameTabFrame = _G[chatFrame:GetName().."Tab"]
	CURRENT_CHAT_FRAME_ID = chatFrame:GetID()
	FCF_ToggleLock()
	chatFrame:SetParent(nil)
	chatFrameTabFrame:SetParent(nil)
	chatFrame:ClearAllPoints()
	chatFrameTabFrame:ClearAllPoints()
	chatFrame:SetParent(chatFrameContainer)
	chatFrameTabFrame:SetParent(chatFrameContainer)
	chatFrame:SetFrameLevel(chatFrameContainer:GetFrameLevel()+1)
	chatFrame:SetWidth(chatFrameContainer:GetWidth() - chatFrameButtonFrame:GetWidth())
	chatFrame:SetHeight(chatFrameContainer:GetHeight() - chatFrameTabFrame:GetHeight())
	chatFrame:SetPoint("BOTTOMLEFT",chatFrameContainer,"BOTTOMLEFT",5,5)
	chatFrame:SetPoint("TOPRIGHT",chatFrameContainer,"TOPRIGHT",-5,-5)
	chatFrameButtonFrame:SetPoint("BOTTOMRIGHT",chatFrameContainer,"BOTTOMRIGHT",-5,5)
	chatFrameTabFrame:SetPoint("BOTTOMLEFT",chatFrameContainer,"TOPLEFT",0,0)
Regardles of IM Style or Classic Style this results in the following screenshots. The first is IM Style and the second is Classic Style.

Unfortunately clicking on the Unlock option of the tab also unparents it from the frame I just parented it to so I may have to do a cheat and hide the tab and just have a text drop down menu for what I want people to have access to and go from there. But will see. Maybe just a warning to only unlock when you don't want it in the right hand side chat frame anymore. Will have to look into options on how to counteract or utilise the function.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_062210_151906.jpg
Views:	748
Size:	285.9 KB
ID:	4460  Click image for larger version

Name:	WoWScrnShot_062210_152220.jpg
Views:	737
Size:	283.4 KB
ID:	4461  
__________________
Xrystal is offline  
Unread 06-22-10, 08:38 AM   #7
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
When I have objects that I need to manage that are "late bloomers" I usually grab the "PLAYER_ENTERING_WORLD" event and do it there... then just unregister the event so I don't end up repeating the action every time the player zones.

I'll look at the code as soon as I get home this evening and get a patch out ASAP. I appreciate the investigation since it will save me time and effort then.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 06-22-10, 08:51 AM   #8
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
OOh, here's something useful.

DockManagerTemplate

Just found it in the FloatingChatFrame.xml file. Sounds like you can create extra docked frames managers to handle even more frames perhaps than the limited 10.

Okay, when you first create a window using FCF_OpenNewWindow the parents of said parts of the window are as follows:
ChatFrame : UIParent
ButtonFrame : ChatFrame
TabFrame : GeneralDockManagerScrollFrameChild

Technically if we create a new chatframe and then reparent the tabframe to the newly create DockManager theoretically the rest of the window will fall in place rofl maybe

And it's no problem .. I have 3 chat plugins to figure out how to incorporate rofl.
__________________
Xrystal is offline  
Unread 06-22-10, 10:35 AM   #9
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
Grr Looked cool for a moment until it decided not to work rofl.. Maybe they haven't completely made the DockManager facility open to developers yet rofl.

Code:
	<Frame name="DockManagerTemplate" frameStrata="LOW" virtual="true" parent="UIParent">
		<Size x="0" y="26"/>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentInsertHighlight" file="Interface\ChatFrame\UI-ChatFrame-DockHighlight" alphaMode="ADD" parentKey="insertHighlight">
					<Size x="32" y="32"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentOverflowButton" parentKey="overflowButton" alpha="0.6">
				<Size x="16" y="16"/>
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="0" y="-5"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Frames>
					<Frame name="$parentList" inherits="DockManagerOverflowListTemplate" parentKey="list">
						<Anchors>
							<Anchor point="LEFT" relativePoint="RIGHT"/>
						</Anchors>
					</Frame>
				</Frames>
				<Scripts>
					<OnLoad>
						self.width = self:GetWidth();
						self:RegisterEvent("UPDATE_CHAT_COLOR");
					</OnLoad>
					<OnEvent>
						FCFDockOverflowButton_OnEvent(self, event, ...);
					</OnEvent>
					<OnEnter>
						GameTooltip_AddNewbieTip(self, CHAT_OVERFLOW_LABEL, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_CHAT_OVERFLOW, 1);
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
					<OnClick>
						FCFDockOverflowButton_OnClick(self, button);
					</OnClick>
				</Scripts>
				<NormalTexture file="Interface\ChatFrame\chat-tab-arrow"/>
				<HighlightTexture file="Interface\ChatFrame\chat-tab-arrow-on" alphaMode="ADD"/>
			</Button>
			<ScrollFrame name="$parentScrollFrame" parentKey="scrollFrame">
				<Size x="0" y="31"/>
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="0" y="-5"/>
						</Offset>
					</Anchor>
				</Anchors>
				<ScrollChild>
					<Frame name="$parentChild" parentKey="child">
						<Size x="1" y="26"/>
						<Anchors>
							<Anchor point="LEFT"/>
						</Anchors>
					</Frame>
					<!--Frames will be dynamically added to the ScrollChild for now-->
				</ScrollChild>
			</ScrollFrame>
		</Frames>
		<Scripts>
			<OnLoad function="FCFDock_OnLoad"/>
			<OnEvent>
				FCFDock_OnEvent(self, event, ...);
			</OnEvent>
		</Scripts>
	</Frame>
Create a frame based on this template and none of the child frames exist and the GENERAL_CHAT_FRAME doesn't seem to do anything with it either rofl. So nothing to guide me by.
__________________
Xrystal is offline  
Unread 06-22-10, 05:13 PM   #10
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Gah -- they must be having a blast with this patch.... still down and now at least one more hour. Don't know if I'm going to get to work on ths chat frames tonight.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 06-22-10, 05:57 PM   #11
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
Well, worse case scenario, if I find some code hacks to make it work I'll let you know
__________________
Xrystal is offline  
Unread 06-24-10, 11:21 AM   #12
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
Rofl .. hows this for a hilarious bug .. happened a few times for me and I can't figure out why as I am setting the frame points to the infopanel rofl.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_062410_181928.jpg
Views:	754
Size:	223.0 KB
ID:	4495  
__________________
Xrystal is offline  
Unread 06-24-10, 03:56 PM   #13
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
nUI_InfoPanel_Whispers

It looks like I finally managed to get the right combination of code at the right combination of events to get it to do what I want. Assuming of course that you haven't used all 10 chat frames up

I'm just taking out all my debug code and then I'll post up a fix for people to try out before I change the other ones to reflect the new changes.
__________________
Xrystal is offline  
Unread 06-25-10, 10:25 AM   #14
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
nUI_InfoPanel_GuildChat

The Addon is pretty much fixed. But running out of time to post it up this minute but the moment I get back from college I will do some last minute testing and then throw it up.

What I did notice is that I had to have an extra check because if I have GuildChat and Whispers at the same time it tries to use the same chat frame because it doesn't dock or show the frames so to speak to flag it as in use. So, I have added a new flag called infoPanel which will tell all similar addons that we don't want to interfere with that chatframe ( well apart from Whispers at the moment so I need to update that one to reflect the new change if it is definitely a problem. Assuming the addons load up in alphabetical order/or infopanel order I might be lucky enough that the whispers plugin will load afterwards uhoh .. yeah gonna have to fix it rofl.

Anyway, after all that, it looks like I have the simple changes in place. nUI_InfoPanel_Chat will be the hardest to fix but thats next on my plate.
__________________
Xrystal is offline  
Unread 06-27-10, 12:22 PM   #15
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
nUI_InfoPanel_Chat

Well, after some time trying to figure out how their new docking system works I gave up and will assume that they haven't quite got it completely working yet rofl.

For now I have added a single value to a saved variables file for this addon to store the chatframe it first finds to use.

When you first log in with this addon it will not know about any other chat frames except those docked or shown by wow and used in an existing infopanel that is using the chatFrame.infoPanel flag.

Once it finds a free chatframe it records it as the one to use from now on. The addon will then initialise the messages to use the same message channels that any manually created docked chat frame gets and attaches it to the panel for your convenience.

When you log out it will re-dock it just in case you change your mind about using the plugin. I tested this ability by disabling the addon and when I logged back in the chatframe was available as a normal docked frame. See the image attached for an example.

When you next log in, instead of initialising the frame as if it is a new window it will instead simply undock itself and attach itself to the infopanel for you to use as and when you choose. Because it doesn't initialise the channels your settings should be kept and on my tests this seems to be the case.

Whilst working on this plugin I again found flaws with the existing code, so again have changed the chat plugins to reflect this problem.

With 3 plugins now that are using almost identical code I am in the process of consolidating the plugins so that the code block is in a separate file that will be added to each addon to use when they need.

Once I am happy that all 3 addons work consistently whether alone or together I will post updates to all 3 .. again Hopefully this will be the last updates until a bug is found or I figure out how that darned docking system thing works.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_062710_185741.jpg
Views:	734
Size:	225.2 KB
ID:	4528  Click image for larger version

Name:	WoWScrnShot_062710_190749.jpg
Views:	751
Size:	220.6 KB
ID:	4529  
__________________

Last edited by Xrystal : 06-27-10 at 12:26 PM.
Xrystal is offline  
Unread 07-04-10, 10:11 AM   #16
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Xrystal --

If I move the initialization of info panels from "PLAYER_LOGIN" to "PLAYER_ENTERING_WORLD" is that going to help you or cause you more headaches?
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 07-04-10, 10:22 AM   #17
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,047
I don't think so. I track ADDON_LOADED for all and UPDATE_CHAT_WINDOWS for the chat frames. Checking to makes sure ....

Yep, the only thing I am using PLAYER_LOGIN for is simple chat test which they removed anyway and to mark when the event has happened so that my chat frames update correctly ... although so far I haven't been able to test that side of it as the one character that has all 10 chat frames in use hasn't had the problem occur .. of course rofl.

I can go through and make the necessary changes to my one and I am sure we can talk people through changing the others until their owners see this rofl.
__________________
Xrystal is offline  
Unread 07-04-10, 10:38 AM   #18
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
I *think* the change will be completely transparent to most plugins.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
 

Go BackWoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Customization » nUI: Developer Chat » Chat Frames and 3.3.5

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