- added user-requested per-bar vertical offsets and setup pet and focus bars to fit within the vertical center of the hud

This commit is contained in:
Parnic
2008-08-26 04:32:16 +00:00
parent 41d9dbe380
commit 3dc6525231
5 changed files with 26 additions and 1 deletions

View File

@ -87,6 +87,7 @@ function IceBarElement.prototype:GetDefaultSettings()
settings["myTagVersion"] = 2
settings["widthModifier"] = 0
settings["usesDogTagStrings"] = true
settings["barVerticalOffset"] = 0
return settings
end
@ -264,6 +265,26 @@ function IceBarElement.prototype:GetOptions()
end
}
opts["barVerticalOffset"] =
{
type='range',
name = '|c' .. self.configColor .. 'Bar vertical offset|r',
desc = 'Adjust the vertical placement of this bar',
min = -100,
max = 100,
step = 1,
get = function()
return self.moduleSettings.barVerticalOffset
end,
set = function(v)
self.moduleSettings.barVerticalOffset = v
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end
}
opts["textSettings"] =
{
type = 'group',
@ -515,7 +536,7 @@ function IceBarElement.prototype:CreateBackground()
end
self.frame:ClearAllPoints()
self.frame:SetPoint("BOTTOM"..ownPoint, self.parent, "BOTTOM"..self.moduleSettings.side, offx, 0)
self.frame:SetPoint("BOTTOM"..ownPoint, self.parent, "BOTTOM"..self.moduleSettings.side, offx, self.moduleSettings.barVerticalOffset)
end