Thread Tools Display Modes
02-05-13, 12:07 PM   #1
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
ChatFrame:SetInsertMode('TOP') ?? (prepend messages instead of append)

So I saw this UI which has the chatframe at the top of the screen rather then at the usual bottom.

I was wondering, since ChatFrame1 is a child of ScrollingMessageFrame... one should be able to call ChatFrame1:SetInsertMode('TOP') or ChatFrame1:SetInsertMode('BOTTOM'). Trying this ingame however does not seem to have any effect however, no errors in buggrabber or in FrameXML.log.

Now I'm curious how one would achieve this effect :P
  Reply With Quote
02-05-13, 05:51 PM   #2
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
ScrollingMessageFrame:AddMessage() has an 'addToTop' argument which ignores the frame's insert mode. This is used in the combat log. Perhaps you should look into that.

http://wowprogramming.com/docs/widge...ame/AddMessage

You could do something like:

Code:
local oldAddMessage = ChatFrame1.AddMessage

ChatFrame1.AddMessage = function(frame, text, red, green, blue, lineID, addToTop, accessID, extraData)
	return oldAddMessage(frame, text, red, green, blue, lineID, true, accessID, extraData)
end

Last edited by Haleth : 02-05-13 at 05:57 PM.
  Reply With Quote
02-06-13, 11:38 AM   #3
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Thanks for finding that!

Going to play with this
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » ChatFrame:SetInsertMode('TOP') ?? (prepend messages instead of append)

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