- fixed "bar visible" checkbox to also hide/show the solar portion of the eclipse bar

This commit is contained in:
Parnic
2010-10-16 15:40:37 +00:00
parent dc85c43a3e
commit 88a309ef8c
2 changed files with 24 additions and 10 deletions

View File

@ -261,11 +261,7 @@ function IceBarElement.prototype:GetOptions()
end,
set = function(info, v)
self.moduleSettings.barVisible['bar'] = v
if v then
self.barFrame:Show()
else
self.barFrame:Hide()
end
self:SetBarVisibility(v)
end,
disabled = function()
return not self.moduleSettings.enabled
@ -766,6 +762,14 @@ end
return opts
end
function IceBarElement.prototype:SetBarVisibility(visible)
if visible then
self.barFrame:Show()
else
self.barFrame:Hide()
end
end
function IceBarElement.prototype:SetBarFramePoints()
self.barFrame:ClearAllPoints()
if (self.moduleSettings.inverse) then
@ -1107,11 +1111,7 @@ function IceBarElement.prototype:UpdateBar(scale, color, alpha)
self.frame.bg:Show()
end
if not self.moduleSettings.barVisible['bar'] then
self.barFrame:Hide()
else
self.barFrame:Show()
end
self:SetBarVisibility(self.moduleSettings.barVisible['bar'])
if DogTag ~= nil and self.moduleSettings.usesDogTagStrings then
DogTag:UpdateAllForFrame(self.frame)

View File

@ -56,6 +56,20 @@ function EclipseBar.prototype:Disable(core)
EclipseBar.super.prototype.Disable(self, core)
end
function EclipseBar.prototype:SetBarVisibility(visible)
EclipseBar.super.prototype.SetBarVisibility(self, visible)
if not self.solarBar then
return
end
if visible then
self.solarBar:Show()
else
self.solarBar:Hide()
end
end
function EclipseBar.prototype:CreateFrame()
EclipseBar.super.prototype.CreateFrame(self)