Reply
 
Thread Tools Display Modes
Old 02-05-13, 11:07 AM   #1
ravagernl
Macro Murloc mgrlglrgl!
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,137
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
ravagernl is offline   Reply With Quote
Old 02-05-13, 04:51 PM   #2
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Mod
Featured
Join Date: Sep 2008
Posts: 1,155
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 04:57 PM.
Haleth is online now   Reply With Quote
Old 02-06-13, 10:38 AM   #3
ravagernl
Macro Murloc mgrlglrgl!
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,137
Thanks for finding that!

Going to play with this
ravagernl is offline   Reply With Quote
Reply

Go BackWoWInterface » 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