mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- another attempt at fixing stack overflow related to dropdown menus for secure frames
This commit is contained in:
@ -854,10 +854,12 @@ function PlayerHealth.prototype:CreateBackground(redraw)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self.frame.button.menu = function()
|
if not self.frame.button.menu then
|
||||||
IceHUD.DropdownUnit = self.unit
|
self.frame.button.menu = function(this, unit)
|
||||||
|
IceHUD.DropdownUnit = unit
|
||||||
ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor")
|
ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
self:EnableClickTargeting(self.moduleSettings.allowMouseInteraction)
|
self:EnableClickTargeting(self.moduleSettings.allowMouseInteraction)
|
||||||
end
|
end
|
||||||
|
@ -699,12 +699,14 @@ function IceTargetHealth.prototype:CreateBackground(redraw)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self.frame.button.menu = function()
|
if not self.frame.button.menu then
|
||||||
IceHUD.DropdownUnit = self.unit
|
self.frame.button.menu = function(this, unit)
|
||||||
|
IceHUD.DropdownUnit = unit
|
||||||
ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor")
|
ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function IceTargetHealth.prototype:EnableClickTargeting(bEnable)
|
function IceTargetHealth.prototype:EnableClickTargeting(bEnable)
|
||||||
|
@ -1037,8 +1037,8 @@ do -- OVERRIDE: IceTargetInfo.prototype:CreateFrame(redraw)
|
|||||||
self.frame:SetAttribute("unit", self.unit)
|
self.frame:SetAttribute("unit", self.unit)
|
||||||
|
|
||||||
if not self.frame.menu then
|
if not self.frame.menu then
|
||||||
self.frame.menu = function()
|
self.frame.menu = function(this, unit)
|
||||||
IceHUD.DropdownUnit = self.unit
|
IceHUD.DropdownUnit = unit
|
||||||
ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor")
|
ToggleDropDownMenu(1, nil, IceHUD_UnitFrame_DropDown, "cursor")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user