You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
681 B
25 lines
681 B
|
3 years ago
|
--local registry = {}
|
||
|
|
--
|
||
|
|
--function Prat:RegisterDropdownButton(name, callback)
|
||
|
|
-- registry[name] = callback or true
|
||
|
|
--end
|
||
|
|
--
|
||
|
|
--
|
||
|
|
--
|
||
|
|
--
|
||
|
|
--local function showMenu(dropdownMenu, which, unit, name, userData, ...)
|
||
|
|
-- for i=1,UIDROPDOWNMENU_MAXBUTTONS do
|
||
|
|
-- local button = _G["DropDownList" .. UIDROPDOWNMENU_MENU_LEVEL .. "Button" .. i];
|
||
|
|
--
|
||
|
|
-- local f = registry[button.value]
|
||
|
|
-- -- Patch our handler function back in
|
||
|
|
-- if f then
|
||
|
|
-- button.func = UnitPopupButtons[button.value].func
|
||
|
|
-- if type(f) == "function" then
|
||
|
|
-- f(dropdownMenu, button)
|
||
|
|
-- end
|
||
|
|
-- end
|
||
|
|
-- end
|
||
|
|
--end
|
||
|
|
--
|
||
|
|
--hooksecurefunc("UnitPopup_ShowMenu", showMenu)
|