WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Adding a context menu button in Premade Groups (https://www.wowinterface.com/forums/showthread.php?t=55742)

Dafeni 09-16-17 01:08 AM

Adding a context menu button in Premade Groups
 
Hi, I'd like to add a button to the menu that pops up when you right-click a group or a player in group finder.

Currently when right-click on a premade group, the options are "Whisper Leader and Report Group". On players it's "Whisper, Report and Ignore".
How can I add another button in those menus that calls a function and passes the leader's or the player's name as an argument?

On other menus you can do something like:

Code:

UnitPopupButtons["MY_BUTTON"] = { text = "My button", dist = 0 }
table.insert(UnitPopupMenus["PLAYER"], #UnitPopupMenus["PLAYER"], "MY_BUTTON")

hooksecurefunc("UnitPopup_OnClick", myFunc)

I know that I can hardcode it right into LFGList.lua, but I'm looking for a way that wouldn't interfere with other addons.


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

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