View Single Post
05/17/14, 10:09 AM   #7
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 161
Lua Code:
  1. local function DERP_OnLinkClicked1(link, button, text, color, linkType, ...)
  2.     -- do your additional stuff
  3.     d("DERP_OnLinkClicked1 on "..tostring(linkType))
  4. end
  5.  
  6. local function DERP_OnLinkClicked2(link, button, text, color, linkType, ...)
  7.     -- do your additional stuff both will be called
  8.     d("DERP_OnLinkClicked2 on "..tostring(linkType))
  9. end
  10.  
  11. LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_CLICKED_EVENT, DERP_OnLinkClicked1)
  12. LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_CLICKED_EVENT, DERP_OnLinkClicked2)

No need to overwrite, hook or detour anything. Both will get called in addition
to the unmodified native code, no matter where you click on the Link.

Cheers!

Last edited by thelegendaryof : 05/17/14 at 10:29 AM.
  Reply With Quote