WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   ChatFrame:SetInsertMode('TOP') ?? (prepend messages instead of append) (https://www.wowinterface.com/forums/showthread.php?t=45782)

ravagernl 02-05-13 12:07 PM

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

Haleth 02-05-13 05:51 PM

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


ravagernl 02-06-13 11:38 AM

Thanks for finding that!

Going to play with this :)


All times are GMT -6. The time now is 05:44 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI