Hi msfighter. Welcome to ESOUI!
In order to add new context menu items you first need to find a hook point where you can run your addon's code. The guild context menu is generated in
guildroster_keyboard.lua starting from line 181. In the last line you can see that self:ShowMenu(control) is called. Which means you can prehook that method and then add your entries inbetween the ingame code's creation of menu entries and the actual code to show the menu like this:
Lua Code:
ZO_PreHook(GUILD_ROSTER_KEYBOARD, "ShowMenu", function()
-- add your entry here like this:
AddCustomMenuItem("MyLabel", function()
-- the click handler
end)
end)
Instead of calling AddMenuItem directly, you should always use the method AddCustomMenuItem provided by
LibCustomMenu in order to prevent seemingly unrelated
"secure code violation" errors in other parts of the UI.