Greetings,
Lua Code:
-- create a table which contains the index you'd like to show in your tooltip
local supportedIndexType = {
item = true,
achievement = true,
quest = true,
unit = true,
enchant = true,
spell = true,
talent = true,
glyph = true,
}
-- create a function which contains the scripts necessary to display the tooltip we need
local function ChatlinkTooltip_Show(self, linkData)
local linkType = string.match(linkData, "(.-):")
if supportedIndexType[linkType] then
GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
GameTooltip:SetHyperlink(linkData)
GameTooltip:Show()
end
end
for frameType = 1, NUM_CHAT_WINDOWS do
local chatType = _G["ChatFrame" .. frameType]
chatType:HookScript("OnHyperLinkEnter", ChatlinkTooltip_Show)
chatType:HookScript("OnHyperLinkLeave", GameTooltip_Hide)
end
This is my lua code so far, i then added a ModifiedClick binding to the bindings.xml:
Lua Code:
<Bindings>
<ModifiedClick action="COMPAREITEMS" default="SHIFT"/>
</Bindings>
But it doesn't work the proper way, i know that i miss something in my lua code to make it show properly.
If i hold down shift before i enter the link in the chat, the tooltip for both the one in chat and the one i have equipped shows.. However, if i'm at my link and i click shift, nothing happends. How can i make this possible, thanks?