09/26/14, 02:38 AM | #1 |
|
Update4 rightclick chatmenu problem
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 |
09/26/14, 07:26 AM | #2 | |
But I'd use different way how to add guild invite items to the context menu - hook function CHAT_SYSTEM:ShowPlayerContextMenu(playerName, rawName).
Warning: Spoiler
GuildInvite Continued.lua:
Lua Code:
localization\EN.lua: Lua Code:
Lua Code:
Lua Code:
Uploaded here: https://www.dropbox.com/s/7l8uj4lnoi...d-modified.zip |
||
09/26/14, 01:55 PM | #3 |
|
Wow mate you fixed it
Thanks alot! |
ESOUI » AddOns » AddOn Help/Support » Update4 rightclick chatmenu problem |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|