mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
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:
@ -714,7 +714,7 @@ function IceTargetHealth.prototype:CreateBackground(redraw)
|
||||
end
|
||||
end
|
||||
|
||||
if not self.frame.button.menu then
|
||||
if not self.frame.button.menu and UnitPopup_ShowMenu then
|
||||
self.frame.button.menu = function(this, unit)
|
||||
IceHUD.DropdownUnit = unit
|
||||
ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor")
|
||||
@ -733,7 +733,7 @@ function IceTargetHealth.prototype:EnableClickTargeting(bEnable)
|
||||
self.frame.button:EnableMouse(true)
|
||||
self.frame.button:RegisterForClicks("AnyUp")
|
||||
self.frame.button:SetAttribute("type1", "target")
|
||||
self.frame.button:SetAttribute("type2", "menu")
|
||||
self.frame.button:SetAttribute("type2", UnitPopup_ShowMenu and "menu" or "togglemenu")
|
||||
self.frame.button:SetAttribute("unit", self.unit)
|
||||
|
||||
-- set up click casting
|
||||
|
Reference in New Issue
Block a user