Thread Tools Display Modes
01-22-16, 02:16 PM   #1
TheSecretSquirrel
A Murloc Raider
Join Date: Jan 2016
Posts: 9
Question Chat frame help

I'm trying to edit the chat window, so that it fits inside a background frame that I've created.

Failing the above, I would like to be able to create my own chat frame within the already created frame (replacing the base chat in a way).

Is there any way I can change the default chat template to do this? (Changing chat would also include changing font .etc - not sure how todo this either).
  Reply With Quote
01-22-16, 02:32 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
What trouble are you having exactly? I've used code similar to this to get a tooltip backdrop around a model frame.

Lua Code:
  1. local BorderFrame=CreateFrame("Frame",nil,ChatFrame1);
  2. BorderFrame:SetPoint("TOPLEFT",-4,4);
  3. BorderFrame:SetPoint("BOTTOMRIGHT",4,-4);
  4. BorderFrame:SetFrameLevel(ChatFrame1:GetFrameLevel()-1);

This creates a frame under ChatFrame1 that extends 4px beyond the edges.
Note Frame:SetFrameLevel() controls the z-order frames are drawn within the same FrameStrata.
All children of a frame inherit the parent's FrameStrata. By default, the FrameLevel is the level of its parent +1.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 01-22-16 at 02:37 PM.
  Reply With Quote
01-22-16, 02:45 PM   #3
TheSecretSquirrel
A Murloc Raider
Join Date: Jan 2016
Posts: 9
The trouble I'm having is that I want to move and reskin the default chat frame. Could I do that with the above code?
  Reply With Quote
01-22-16, 04:00 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
It's one of many possibilities depending on how you want the end result to look. You asked for a container frame to wrap around the ChatFrame and this provides a way. It attaches to the frame, moving and resizing with it.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Chat frame help


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