Clickable item links in textbuffer
I made a textbuffer and i am sending messages to it with :AddMessage(some_msg) If there is an item link in the message, i can't click on it and get a tooltip. If i send the same message to the regular chat window like d(some_msg) then it works. What am i missing to make item links work in textbuffers ?
|
Is your textbuffer mouse enabled?
|
I had the same problem as well. Even having SetLinkEnabled(true) set for the textbuffer didn't make a difference. It wasn't an addon breaker for me so I just changed it from the link displaying to the name.
|
Quote:
darn... yes mine is .. scratch that idea |
Same for me doesn't work at all. May be we should use some SetTooltip method or sth like that.
|
Quote:
Code:
CDGLibGui.window.TEXTBUFFER = WINDOW_MANAGER:CreateControl("CDGLibGuiWindow_TB", CDGLibGui.window.ID, CT_TEXTBUFFER) |
Well, not sure about TESO, but TextBuffers are usually not used for display but used to edit the text over and over again until the code is finished and then copying the result to the real edit control for the display. That's why it's called "Buffer".
So it's likely that the TextBuffer just doesn't do a lot of stuff other controls for displaying stuff is doing. |
Quote:
|
Quote:
|
As far as i could dig into how the current chat tabs work and as far as i can remember at the moment (@work atm) is that the eso ChatTabs also use TEXTBUFFER to display text. I tried to see if there was a difference between the implementation of the eso chattabs and my own textbuffer, but i couldn't find any.
Could it be that some additional event handling needs to be done to make the tooltips work ? |
I think it is a bug, experienced the same issue
To solve I set an handler like this Code:
buffer:SetHandler("OnLinkClicked", function(self, ...) return ZO_ChatSystem_OnLinkClicked(...) end) -- \esoui\ingame\chatsystem\chatsystem.lua, line 2540 -- linkData, linkText, button |
hmm, maybe not a bug then.
Perhaps the chat frames use a virtual frame that already has that handler configured. Thanks, will try and will confirm if it resolves my situation. edit: Nada. The handler didn't trigger at all. Investigating other settings that may be required on a simple text buffer. edit2: Nothing springs to mind that hasn't already been set up. |
Quote:
Code:
local frameLogBuffer = CreateControl(nil, frameLog, CT_TEXTBUFFER) :SetMouseEnabled(true) :SetLinkEnabled(true) |
Yep I do.
However, because I had set up everything else up in XML the SetLinkEnabled setting didn't work. I had to change the xml tag to be linkEnabled="true". Until I made that change it didn't work. Lua Code:
|
All times are GMT -6. The time now is 04:19 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI