Remove UnitPopupButtons usage

I need to find a way to reintroduce this, but Blizzard's new method of building these frames doesn't look like it's going to be particularly easy. This stops error popups on 9.2.5
This commit is contained in:
Parnic
2022-06-01 08:29:39 -05:00
parent 47931922bd
commit 82db70969a
3 changed files with 121 additions and 117 deletions

View File

@ -684,6 +684,7 @@ function IceHUD:GetIsInLFGGroup()
return IsInLFGGroup return IsInLFGGroup
end end
if UnitPopupButtons then
local BLACKLISTED_UNIT_MENU_OPTIONS = { local BLACKLISTED_UNIT_MENU_OPTIONS = {
SET_FOCUS = "ICEHUD_SET_FOCUS", SET_FOCUS = "ICEHUD_SET_FOCUS",
CLEAR_FOCUS = "ICEHUD_CLEAR_FOCUS", CLEAR_FOCUS = "ICEHUD_CLEAR_FOCUS",
@ -799,9 +800,7 @@ local function figure_unit_menu(unit)
end end
IceHUD_UnitFrame_DropDown = CreateFrame("Frame", "IceHUD_UnitFrame_DropDown", UIParent, "UIDropDownMenuTemplate") IceHUD_UnitFrame_DropDown = CreateFrame("Frame", "IceHUD_UnitFrame_DropDown", UIParent, "UIDropDownMenuTemplate")
if UnitPopupFrames then
UnitPopupFrames[#UnitPopupFrames+1] = "IceHUD_UnitFrame_DropDown" UnitPopupFrames[#UnitPopupFrames+1] = "IceHUD_UnitFrame_DropDown"
end
IceHUD.DropdownUnit = nil IceHUD.DropdownUnit = nil
UIDropDownMenu_Initialize(IceHUD_UnitFrame_DropDown, function() UIDropDownMenu_Initialize(IceHUD_UnitFrame_DropDown, function()
@ -815,3 +814,4 @@ UIDropDownMenu_Initialize(IceHUD_UnitFrame_DropDown, function()
UnitPopup_ShowMenu(IceHUD_UnitFrame_DropDown, menu, IceHUD.DropdownUnit, nil, id) UnitPopup_ShowMenu(IceHUD_UnitFrame_DropDown, menu, IceHUD.DropdownUnit, nil, id)
end end
end, "MENU", nil) end, "MENU", nil)
end

View File

@ -1,5 +1,9 @@
# Changelog # Changelog
v1.13.15:
- Fixed compatibility with WoW 9.2.5.
v1.13.14: v1.13.14:
- Fixed target health updating infrequently on Classic. - Fixed target health updating infrequently on Classic.

View File

@ -1,5 +1,5 @@
# Changelog # Changelog
v1.13.14: v1.13.15:
- Fixed target health updating infrequently on Classic. - Fixed compatibility with WoW 9.2.5.