Thread Tools Display Modes
09-16-17, 01:08 AM   #1
Dafeni
A Kobold Labourer
Join Date: Sep 2017
Posts: 1
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.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Adding a context menu button in Premade Groups

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off