ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Add Menu Item (https://www.esoui.com/forums/showthread.php?t=6930)

msfighter 04/01/17 08:03 AM

Add Menu Item
 
Hi Iīm very new to ESO UI Development.

Just a short question:

How can i add an entry to i.e. the guild memberlist context menu?

Thanks for your help.

sirinsidiator 04/01/17 08:26 AM

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:
  1. ZO_PreHook(GUILD_ROSTER_KEYBOARD, "ShowMenu", function()
  2.     -- add your entry here like this:
  3.     AddCustomMenuItem("MyLabel", function()
  4.         -- the click handler
  5.     end)
  6. 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.

msfighter 04/03/17 01:07 AM

Thanks, that worked fine...

And is there some kinde of help or API to see what entry Point i should start like "GUILD_ROSTER_KEYBOARD" :-) Itīs hard to find out myself.

So what do i Need to get guild bank Information for guildmember or information on selled items by the guildmerchant.

Thanks in advance and Kind regards.

AssemblerManiac 04/03/17 06:14 AM

Quote:

Originally Posted by msfighter (Post 30440)
Thanks, that worked fine...

And is there some kinde of help or API to see what entry Point i should start like "GUILD_ROSTER_KEYBOARD" :-) Itīs hard to find out myself.

So what do i Need to get guild bank Information for guildmember or information on selled items by the guildmerchant.

Thanks in advance and Kind regards.

Have a look at MasterMerchant if you want to scrape info from sales.


All times are GMT -6. The time now is 07:48 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI