Originally Posted by Kith
You could try using the ZO built in prehook. As far as I know there is no posthook though so it'll run before the default code does
Lua Code:
ZO_PreHookHandler(ZO_PlayerInventoryTabsButton7, 'OnMouseUp', function(...) -- do your stuff here, the ... is the variables passed end)
|
I had no idea there was a built in PreHook in the API. I just made them myself where necessary and store the old event handler separately in case the player turns off the addon. The only problem I have run into here is if the original event handler eventually runs protected/private code somewhere in the stack. Does anyone know if the ZO PreHook accounts for that?