mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- fixed text staying hidden when disabling and re-enabling a module
This commit is contained in:
@ -86,6 +86,7 @@ function IceBarElement.prototype:Enable()
|
||||
self:RegisterFontStrings()
|
||||
|
||||
-- allows frames that show/hide via RegisterUnitWatch to not show text when they shouldn't
|
||||
if self.frame:GetScript("OnHide") == nil then
|
||||
self.frame:SetScript("OnHide", function()
|
||||
if self.moduleSettings.textVisible["upper"] then
|
||||
self.frame.bottomUpperText:Hide()
|
||||
@ -95,6 +96,8 @@ function IceBarElement.prototype:Enable()
|
||||
end
|
||||
self:OnHide()
|
||||
end)
|
||||
end
|
||||
if self.frame:GetScript("OnShow") == nil then
|
||||
self.frame:SetScript("OnShow", function()
|
||||
if self.moduleSettings.textVisible["upper"] then
|
||||
self.frame.bottomUpperText:Show()
|
||||
@ -105,6 +108,7 @@ function IceBarElement.prototype:Enable()
|
||||
self:OnShow()
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function IceBarElement.prototype:OnHide()
|
||||
IceHUD.IceCore:RequestUpdates(self, nil)
|
||||
@ -120,8 +124,6 @@ function IceBarElement.prototype:Disable(core)
|
||||
IceBarElement.super.prototype.Disable(self, core)
|
||||
|
||||
IceHUD.IceCore:RequestUpdates(self, nil)
|
||||
self.frame:SetScript("OnHide", nil)
|
||||
self.frame:SetScript("OnShow", nil)
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user