Thread Tools Display Modes
03-23-06, 10:46 PM   #1
Jaundar
A Murloc Raider
Join Date: Mar 2006
Posts: 4
Item Tooltip from Item Link

Hi, Im looking for a way to get the an items tooltip text by providing an item link/id.

Any help would be great.

Thanks,

Jaundar
  Reply With Quote
03-23-06, 11:41 PM   #2
robodude666
A Cyclonian
 
robodude666's Avatar
Join Date: Mar 2006
Posts: 42
Originally Posted by Jaundar
Hi, Im looking for a way to get the an items tooltip text by providing an item link/id.

Any help would be great.

Thanks,

Jaundar
Hey,

I seen it done before, but I dont think its a function that does it... What you can do is use GetItemInfo() (both id and itemstring work) will output a table full of values about this item. From that table you can make your own tooltip.
Link: http://www.wowwiki.com/API_GetItemInfo
If your using Sea, check out http://www.wowwiki.com/Sea.wow.item.getItemInfo its basically the same thing but I think it gives you more info.
  Reply With Quote
03-24-06, 03:39 AM   #3
Elkano
A Flamescale Wyrmkin
 
Elkano's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 131
The other method would be:
- generate a (hidden) tooltip
- 'scan' the tooltip (have a look at the tooltip's XML file for the string names)
Say your hidden tooltip is called TTH, then you wold call eg getglobal("TTHTextLeft1"):GetText() or getglobal("TTHTextRight1"):GetText(); afair a normal tooltip can have up to 15 lines.

Yo will then have the whole text of the tooltip, but without text size, color and so on.
  Reply With Quote
03-24-06, 07:27 AM   #4
Jaundar
A Murloc Raider
Join Date: Mar 2006
Posts: 4
Hey, thanks for the info. How do I generate a tooltip?


Thanks,

Jaundar
  Reply With Quote
03-24-06, 08:36 AM   #5
Elkano
A Flamescale Wyrmkin
 
Elkano's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2005
Posts: 131
first you have to declare the tooltip in the xml file:
<GameTooltip name="TTH" inherits="GameTooltipTemplate" parent="UIParent" hidden="true" />

Then you simply use one of the many provided functions to populate the tooltip with data:
http://www.wowwiki.com/Widget_API#GameTooltip
eg: TTH:SetHyperlink(itemID)

where itemID is sth like item:1:2:3:4
  Reply With Quote
03-25-06, 07:07 AM   #6
Jaundar
A Murloc Raider
Join Date: Mar 2006
Posts: 4
Hey, thanks again for the info I got it working.

Thanks,

Jaundar
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Item Tooltip from Item Link


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