Attach chat editbox to a frame other than DEFAULT_CHAT_FRAME
First, a little preamble.
Ever since the days of Lineage2, I'm used to less-than-important-but-still-useful messages to be redirected to a separate, always visible chat frame. This is how it looks in today's WoW: https://prnt.sc/h9jg76 But here's the problem. All addons send their output to DEFAULT_CHAT_FRAME naively assuming that it is the frame people watch the most. There's a simple solution to output data to the desired frame, but when I do something like Lua Code:
Is there an easy way to move editbox to a more appropriate place? |
The addon Prat can do this.
Here's a screenshot below of where the setting is. You may need to enable "Editbox" in the Module Control tab, where I put the question mark. Click the screenshot for full size. If you don't want a full chat addon just for this function, you can disable everything but the Editbox in the Module Control and the Editbox will be the only thing it does. |
Chatter does the same, in the same way (read: ugly half-[censored] [censored]…)
I'm looking for a more clean way to do it, than what these both addons are doing. |
Code:
-- function to reposition editbox To change the positioning of the box you will want to edit the 1st SetPoint. BOTTOM = anchor point (so in that line you're anchoring the bottom of the editbox) self = the chatframe (if you want to anchor it to a different parent then you will need to change all 3 setpoints) TOP = relative point (basically where you want to position said object in reference to "self" or the parent) 0 = x coords 22 = y coords |
I'm familiar with frame positioning basics.
Thanks for an example, will see how to apply it to my case! |
A slightly relevant question: What is the earliest event where chat frames are available?
I'd like to hook a few functions there once. Changing default chat frame in PLAYER_ENTERING_WORLD doesn't work desirable for my purposes, it breaks a few functions of Chatter that I'd like to keep functional. Such as edit box history. |
You could try UPDATE_CHAT_WINDOWS, see if that does what you want.
If you need it to only fire once, you can unregister the event from within your script. Not sure how often UPDATE_CHAT_WINDOWS fires. All I did was make it print "hi" in chatbox and that showed up before my guild MotD even. |
Thanks. A number of experiments made me think that I should look for different ways to do what I want to do.
Since this is quickly drifting out of the topic title, I'll submit a new topic once I have a better understanding of my needs. |
All times are GMT -6. The time now is 06:54 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI