Fix popup menu replacement code error on 11.0.2 (temp)

This removes the menu replacement code that is preventing errors when trying to focus someone or dismiss a pet through a right-click menu on an addon. There is a new API, UnitPopup_OpenMenu, that is a replacement for ShowMenu, but it's not a drop-in replacement, so until I have access to the beta or an 11.0.2 PTR there's not much I can do here.
This commit is contained in:
Parnic
2024-07-21 13:54:45 -05:00
parent 9b063bed63
commit f15dda769d

View File

@ -1010,17 +1010,20 @@ if UnitPopupFrames then
end
IceHUD.DropdownUnit = nil
UIDropDownMenu_Initialize(IceHUD_UnitFrame_DropDown, function()
if not IceHUD.DropdownUnit then
return
end
-- todo: update for new UnitPopup_OpenMenu() API
if UnitPopup_ShowMenu then
UIDropDownMenu_Initialize(IceHUD_UnitFrame_DropDown, function()
if not IceHUD.DropdownUnit then
return
end
local menu, id = figure_unit_menu(IceHUD.DropdownUnit)
if menu then
menu = IceHUD.MungeUnitMenu(menu)
UnitPopup_ShowMenu(IceHUD_UnitFrame_DropDown, menu, IceHUD.DropdownUnit, nil, id)
end
end, "MENU", nil)
local menu, id = figure_unit_menu(IceHUD.DropdownUnit)
if menu then
menu = IceHUD.MungeUnitMenu(menu)
UnitPopup_ShowMenu(IceHUD_UnitFrame_DropDown, menu, IceHUD.DropdownUnit, nil, id)
end
end, "MENU", nil)
end
function IceHUD:OutOfCombatWrapper(func)
return function(...)