Thread Tools Display Modes
04/24/14, 01:10 PM   #1
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
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 ?
  Reply With Quote
04/24/14, 02:03 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
Is your textbuffer mouse enabled?
  Reply With Quote
04/24/14, 02:03 PM   #3
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
Originally Posted by Seerah View Post
Is your textbuffer mouse enabled?
ooh, good point...

darn... yes mine is .. scratch that idea

Last edited by Xrystal : 04/24/14 at 02:06 PM.
  Reply With Quote
04/24/14, 02:51 PM   #4
BadVolt
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 74
Same for me doesn't work at all. May be we should use some SetTooltip method or sth like that.
  Reply With Quote
04/24/14, 02:53 PM   #5
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
Originally Posted by Seerah View Post
Is your textbuffer mouse enabled?
It wasn't, but making it mouse enabled didn't make a difference. Below the code that makes the textbuffer
Code:
	CDGLibGui.window.TEXTBUFFER = WINDOW_MANAGER:CreateControl("CDGLibGuiWindow_TB", CDGLibGui.window.ID, CT_TEXTBUFFER)	
 	CDGLibGui.window.TEXTBUFFER:SetLinkEnabled(true)
	CDGLibGui.window.TEXTBUFFER:SetMouseEnabled(true)
 	CDGLibGui.window.TEXTBUFFER:SetFont("ZoFontChat")
 	CDGLibGui.window.TEXTBUFFER:SetHidden(false)
	CDGLibGui.window.TEXTBUFFER:SetClearBufferAfterFadeout(false)
 	CDGLibGui.window.TEXTBUFFER:SetLineFade(10, 3)
 	CDGLibGui.window.TEXTBUFFER:SetMaxHistoryLines(100)
	CDGLibGui.window.TEXTBUFFER:SetDimensions(500-64, 264-64)
	CDGLibGui.window.TEXTBUFFER:SetAnchor(TOPLEFT,CDGLibGui.window.ID,TOPLEFT,32,32)
  Reply With Quote
04/25/14, 04:02 AM   #6
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
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.
  Reply With Quote
04/25/14, 04:28 AM   #7
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
Originally Posted by Iyanga View Post
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.
Makes sense. If that was what it was designed for. But some of the functionality that is listed for it clearly gives the impression that it is used for displaying information (AddMessage) including links (SetLinkEnabled) etc.
  Reply With Quote
04/25/14, 04:35 AM   #8
BadVolt
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 74
Originally Posted by Iyanga View Post
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.
That's fine, but TextBuffer have method "SetLinkEnabled". And it do not work.
  Reply With Quote
04/25/14, 06:51 AM   #9
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
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 ?
  Reply With Quote
04/24/14, 02:03 PM   #10
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
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.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Clickable item links in textbuffer


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