mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- fixed bar text not properly hiding on bars that use RegisterUnitWatch to control visibility
This commit is contained in:
@ -60,12 +60,32 @@ function IceBarElement.prototype:Enable()
|
||||
end
|
||||
|
||||
self:RegisterFontStrings()
|
||||
|
||||
-- allows frames that show/hide via RegisterUnitWatch to not show text when they shouldn't
|
||||
self.frame:SetScript("OnHide", function()
|
||||
if self.moduleSettings.textVisible["upper"] then
|
||||
self.frame.bottomUpperText:Hide()
|
||||
end
|
||||
if self.moduleSettings.textVisible["upper"] then
|
||||
self.frame.bottomLowerText:Hide()
|
||||
end
|
||||
end)
|
||||
self.frame:SetScript("OnShow", function()
|
||||
if self.moduleSettings.textVisible["upper"] then
|
||||
self.frame.bottomUpperText:Show()
|
||||
end
|
||||
if self.moduleSettings.textVisible["upper"] then
|
||||
self.frame.bottomLowerText:Show()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function IceBarElement.prototype:Disable(core)
|
||||
IceBarElement.super.prototype.Disable(self, core)
|
||||
|
||||
self.frame:SetScript("OnUpdate", nil)
|
||||
self.frame:SetScript("OnHide", nil)
|
||||
self.frame:SetScript("OnShow", nil)
|
||||
end
|
||||
|
||||
|
||||
|
@ -114,10 +114,6 @@ function IceCustomHealth.prototype:Enable(core)
|
||||
self:CreateFrame()
|
||||
|
||||
self.scheduledEvent = self:ScheduleRepeatingTimer("Update", IceHUD.IceCore:UpdatePeriod())
|
||||
|
||||
if not IceHUD.IceCore:ShouldUseDogTags() then
|
||||
self.frame:SetScript("OnHide", function() self:SetBottomText1("") self:SetBottomText2("") end)
|
||||
end
|
||||
end
|
||||
|
||||
function IceCustomHealth.prototype:Disable(core)
|
||||
|
@ -258,10 +258,6 @@ function FocusHealth.prototype:Enable(core)
|
||||
-- for showing/hiding the frame based on unit visibility
|
||||
self.frame:SetAttribute("unit", self.unit)
|
||||
RegisterUnitWatch(self.frame)
|
||||
|
||||
if not IceHUD.IceCore:ShouldUseDogTags() then
|
||||
self.frame:SetScript("OnHide", function() self:SetBottomText1("") self:SetBottomText2("") end)
|
||||
end
|
||||
end
|
||||
|
||||
function FocusHealth.prototype:CreateBackground()
|
||||
|
@ -70,10 +70,6 @@ function PetHealth.prototype:Enable(core)
|
||||
self.frame:SetAttribute("unit", self.unit)
|
||||
RegisterUnitWatch(self.frame)
|
||||
|
||||
if not IceHUD.IceCore:ShouldUseDogTags() then
|
||||
self.frame:SetScript("OnHide", function() self:SetBottomText1("") self:SetBottomText2("") end)
|
||||
end
|
||||
|
||||
self:CheckPet()
|
||||
end
|
||||
|
||||
|
@ -646,10 +646,6 @@ function IceTargetHealth.prototype:Enable(core)
|
||||
self:Update(self.unit)
|
||||
|
||||
RegisterUnitWatch(self.frame)
|
||||
|
||||
if not IceHUD.IceCore:ShouldUseDogTags() then
|
||||
self.frame:SetScript("OnHide", function() self:SetBottomText1("") self:SetBottomText2("") end)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user