View Single Post
03/26/20, 05:39 AM   #4
Keldor
 
Keldor's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2015
Posts: 101
Thanks Baertram, your snippet works well. I looked at your WishList AddOn and my code looks like this.
Is there something here that also needs to be addressed or is the code okay?

Lua Code:
  1. function ESOFarmBuddy.LinkContextMenu(link, button, _, _, linkType, ...)
  2.     if button == MOUSE_BUTTON_INDEX_RIGHT and linkType == ITEM_LINK_TYPE then
  3.         zo_callLater(
  4.             function()
  5.                 AddCustomMenuItem(GetString(ESOFB_MENU_TRACK), function() ESOFarmBuddy.TrackItemFromLink(link) end, MENU_ADD_OPTION_LABEL)
  6.                 ShowMenu()
  7.             end
  8.         , 4)
  9.     end
  10. end
  11.  
  12. LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_MOUSE_UP_EVENT, ESOFarmBuddy.LinkContextMenu)

Another question: Is there any way to add a context menu entry to auction house result items?

Keldor

Last edited by Keldor : 03/26/20 at 06:28 AM.
  Reply With Quote