m
Move page script moved page UIHANDLER OnTooltipSetItem to WoW:UIHANDLER OnTooltipSetItem without leaving a redirect
(New page: {{widgetmethod}} Invoked when an item's information is added to a tooltip. == Arguments == :;arg1: Tooltip - The Tooltip object to which an item was added. == Example == -- overload ...) |
m (Move page script moved page UIHANDLER OnTooltipSetItem to WoW:UIHANDLER OnTooltipSetItem without leaving a redirect) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{widgethandler}} | ||
Invoked when an item's information is added to a tooltip. | Invoked when an item's information is added to a tooltip. | ||
| Line 10: | Line 10: | ||
-- overload the base function for ItemRefTooltip with a custom routine | -- overload the base function for ItemRefTooltip with a custom routine | ||
ItemRefTooltip:HookScript("OnTooltipSetItem", function(tooltip, ...) | |||
local name, link = tooltip:GetItem() | local name, link = tooltip:GetItem() | ||
local texture = select(10, GetItemInfo(link)) | local texture = select(10, GetItemInfo(link)) | ||
| Line 23: | Line 19: | ||
--Repaint tooltip with newly added lines | --Repaint tooltip with newly added lines | ||
tooltip:Show() | tooltip:Show() | ||
end | end) | ||