mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- 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:
@ -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
|
||||
self:SetBottomText1(text)
|
||||
self:SetBottomText2()
|
||||
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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user