apply more duct tape

This commit is contained in:
Hendrik Leppkes
2007-11-30 14:15:53 +00:00
parent a4526dc438
commit cfa080b1cf
3 changed files with 61 additions and 16 deletions
+27 -5
View File
@@ -1,19 +1,41 @@
--[[ $Id: Bartender3.lua 49922 2007-09-26 20:15:15Z nevcairiel $ ]]
--[[ $Id$ ]]
local BT4ActionBars = Bartender4:NewModule("ActionBars")
local Bar = Bartender4.Bar
local Bar = Bartender4.Bar.prototype
local ActionBar = setmetatable({}, {__index = Bar})
local ActionBar_MT = {__index = ActionBar}
local defaults = {
profile = {
Bars = {
['**'] = {
Scale = 1,
Alpha = 1,
}
}
}
}
local actionbars = {}
function BT4ActionBars:OnInitialize()
self.db = Bartender4.db:RegisterNamespace("ActionBars", defaults)
for i=1,10 do
actionbars[i] = ActionBar:Create(i)
actionbars[i] = ActionBar:Create(i, self.db.profile.Bars[i])
end
end
function ActionBar:Create(id)
local bar = setmetatable(Bar:Create(id, "SecureStateDriverTemplate"), ActionBar_MT)
function ActionBar:Create(id, config)
local bar = setmetatable(Bartender4.Bar:Create(id, "SecureStateDriverTemplate", config), ActionBar_MT)
if not config.x or not config.y then
bar:SetPoint("CENTER", 0, -250 + (id-1) * 38)
bar:SavePosition()
else
bar:LoadPosition()
end
bar:Unlock()
return bar
end