View Single Post
02/12/23, 02:33 PM   #6
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Yeah, I real clever tricky thing I have learnd from @Garkin.

You could start with:
Lua Code:
  1. local function TooltipHook(tooltipControl, method, linkFunc)
  2.         local origMethod = tooltipControl[method]
  3.      
  4.         tooltipControl[method] = function(self, ...)
  5.             origMethod(self, ...)
  6.             d(linkFunc(...))
  7.         end
  8.     end
As you can see in my RuneTooltip code, each tooltip method is hooked given the corresponding function to convert the given parameters to an itemLink. To understand that, you have to look at the method and the corresponding function signatures within the documentation:
https://github.com/esoui/esoui/blob/...umentation.txt
  Reply With Quote