Hi there ppl since update 4 api 100009 i have a problim with my code.
I was able to fix the rightclicking in the chatwindow to show my own context menu.
However the original context menu dissapeared with it.
Can anyone help me to add my menu items on te original context menu?
Code:
local function Clicked(link, button, control, _, linkType)
ClearMenu()
local pname = (string.sub(control, 2, -2))
if isdebug then
d("Name used for invite: "..pname)
end
if button == 2 then
ZO_Menu:SetHidden(true)
numGuilds = GetNumGuilds()
for i=1,numGuilds do
local gid = GetGuildId(i)
if(DoesPlayerHaveGuildPermission(gid,GUILD_PERMISSION_INVITE) == true) then
local guildName = GetGuildName(gid)
AddMenuItem(string.format(Trans.GUILDINVITE,guildName), function() addPlayerToGuild(pname, gid, guildName) end)
end
end
ShowMenu(control)
end
end