Restore context menus for Health and Info modules

Apparently we don't have to do any of this anymore (and might not have had to do it for a long time, but I missed the memo) so if we can, just use the built-in menuing stuff. Setting focus doesn't trigger taint with this.
This commit is contained in:
Parnic
2024-07-25 22:25:55 -05:00
parent 8a3f9e19d0
commit e94138d201
6 changed files with 14 additions and 7 deletions

View File

@ -1150,7 +1150,7 @@ do -- OVERRIDE: IceTargetInfo.prototype:CreateFrame(redraw)
self.frame:SetScript("OnLeave", function(frame) self:OnLeave(frame) end)
self.frame:SetAttribute("type1", "target")
self.frame:SetAttribute("type2", "menu")
self.frame:SetAttribute("type2", UnitPopup_ShowMenu and "menu" or "togglemenu")
-- set up click casting
ClickCastFrames = ClickCastFrames or {}
@ -1173,7 +1173,7 @@ do -- OVERRIDE: IceTargetInfo.prototype:CreateFrame(redraw)
self.frame:SetAttribute("unit", self.unit)
if not self.frame.menu then
if not self.frame.menu and UnitPopup_ShowMenu then
self.frame.menu = function(this, unit)
IceHUD.DropdownUnit = unit
ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor")