improve defaults and DB handling

This commit is contained in:
Hendrik Leppkes
2007-12-01 09:06:18 +00:00
parent 75deac4e1e
commit 23316ede0f
5 changed files with 62 additions and 24 deletions
+4 -1
View File
@@ -11,7 +11,8 @@ Bartender4.Button = {}
Bartender4.Button.prototype = Button
function Bartender4.Button:Create(id, parent)
local absid = (parent.id - 1) * 12 + id
local button = setmetatable(CreateFrame("CheckButton", ("BT4Button%d"):format(absid), parent, "ActionBarButtonTemplate"), Button_MT)
local name = ("BT4Button%d"):format(absid)
local button = setmetatable(CreateFrame("CheckButton", name, parent, "ActionBarButtonTemplate"), Button_MT)
button:SetAttribute("type", "action")
button:SetAttribute("useparent-unit", true)
@@ -23,6 +24,8 @@ function Bartender4.Button:Create(id, parent)
this = button
ActionButton_UpdateAction()
_G[("%sNormalTexture"):format(name)]:Hide()
button:Show()
return button