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