Thread Tools Display Modes
Prev Previous Post   Next Post Next
11/05/17, 10:28 AM   #1
static_recharge
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 35
Chat Context Menu Help

I'm trying to add a menu item to the chat context menu for player names. I've looked up how a couple of different addons add menu items to other context menus and think I understand the concept fairly well. Using Zgoo and looking at the source code I've found what I believe to be the proper table and function to prehook. However it doesn't work. When I replace those arguments with ones from other addons that add menu items to the inventory context menu, it works, so I know my function that the prehook is calling works.

Here's the prehook function I think should work but isn't:
Code:
ZO_PreHook(ZO_ChatSystem, "ShowPlayerContextMenu", GH.ContextMenu)
GH.ContextMenu is a function that I have defined directly above the prehook call. When I replace ZO_ChatSystem and "ShowPlayerContextMenu" with "ZO_InventorySlot_DiscoverSlotActionsFromActionList" my menu item gets added no problem to the inventory context menu.

The section of the source code I am looking at is here, line 2077:
http://esodata.uesp.net/current/src/...ystem.lua.html

Also, as an additional question, once this does work how do I retrieve the player's @name that was clicked on for use in my function that the prehook calls?
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » Chat Context Menu Help


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off