View Single Post
02-22-24, 12:43 AM   #16
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,892
I was assured that it would work in GetItemLinkById. But it looks like we just didn't understand each other.
Assured by who? If it's not a game function and it's not one of yours hidden somewher in other code then I don't know where it comes from.

But it displays the items in the chat, rather than displaying a table. And it is the table that I need.
Still not sure what it is you want. Possibly just a custom tooltip?

Delete the lines
Lua Code:
  1. button:SetScript("OnHyperlinkEnter", OnHyperlinkEnter)

(You can delete the OnHyperlinkEnter function as well)

Change the OnHyperlinkClick function to:
Lua Code:
  1. Change the OnHyperlinkClick function to be
  2.     GameTooltip:SetOwner(self, "ANCHOR_CURSOR_RIGHT")
  3.     GameTooltip:AddText("Unlocks this customization option for the Renewed Proto-Drake at the Rostrum of Transformation")
  4.     GameTooltip:Show()
  5. end
Once again, just an example tooltip with fixed text (which you could (would) get the actual text from the addon.db table or some other source).

The other possabilty is you want the click to open the item tooltip rather than doing it OnEnter in which case, the the OnHyperlinkClick function would be:
Lua Code:
  1. local function OnHyperlinkClick(self, link, text, region, left, bottom, width, heigh) -- Show the hyperling tooltip when clicked
  2.     SetItemRef(link, text, button, self);
  3. end
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 02-22-24 at 01:15 AM.
  Reply With Quote