mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-21 11:50:49 +00:00
libtooltip: add support for tooltip hyperlinks
This commit is contained in:
@@ -49,6 +49,18 @@ end
|
|||||||
pfUI.api.libtooltip = libtooltip
|
pfUI.api.libtooltip = libtooltip
|
||||||
|
|
||||||
-- setup item hooks
|
-- setup item hooks
|
||||||
|
local pfHookSetHyperlink = GameTooltip.SetHyperlink
|
||||||
|
function GameTooltip.SetHyperlink(self, arg1)
|
||||||
|
if arg1 then
|
||||||
|
local _, _, linktype = string.find(arg1, "^(.-):(.+)$")
|
||||||
|
if linktype == "item" then
|
||||||
|
libtooltip.itemLink = arg1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return pfHookSetHyperlink(self, arg1)
|
||||||
|
end
|
||||||
|
|
||||||
local pfHookSetBagItem = GameTooltip.SetBagItem
|
local pfHookSetBagItem = GameTooltip.SetBagItem
|
||||||
function GameTooltip.SetBagItem(self, container, slot)
|
function GameTooltip.SetBagItem(self, container, slot)
|
||||||
-- skip special/invalid calls to the function
|
-- skip special/invalid calls to the function
|
||||||
|
|||||||
Reference in New Issue
Block a user