- fixed a bug causing the mirror bar to not obey "offset" setting

- made the mirror bar's text stop bouncing up and down based on its offset setting. now will always remain in the same place (since there are vertical/horizontal adjustment sliders for this text already)
This commit is contained in:
Parnic
2008-10-14 01:46:29 +00:00
parent b85b9a48ad
commit 3671b0da91

View File

@ -27,6 +27,10 @@ function MirrorBar.prototype:init(side, offset, name, db)
self.moduleSettings.offset = offset
self.moduleSettings.barVisible = {bar = true, bg = true}
self.moduleSettings.shouldAnimate = false
-- this has to be set to 0 or else it will error out when trying to use it for SetPoint later
self.moduleSettings.barVerticalOffset = 0
-- avoid nil warnings here
self.moduleSettings.myTagVersion = IceHUD.CurrTagVersion
-- unregister the event superclass registered, we don't want to register
-- this to the core
@ -93,13 +97,8 @@ function MirrorBar.prototype:OnUpdate(elapsed)
local text = self.label .. " " .. remaining .. "s"
if (math.fmod(self.moduleSettings.offset, 2) == 1) then
self:SetBottomText1(text)
self:SetBottomText2()
else
self:SetBottomText1()
self:SetBottomText2(text, "Text", 1)
end
end
@ -490,7 +489,6 @@ function MirrorBarHandler.prototype:SetSettings(bar)
bar.moduleSettings.textVerticalOffset = self.moduleSettings.textVerticalOffset
bar.moduleSettings.textHorizontalOffset = self.moduleSettings.textHorizontalOffset
bar.moduleSettings.barVisible = self.moduleSettings.barVisible
bar.moduleSettings.myTagVersion = self.moduleSettings.myTagVersion
end