use db namespaces to store the actionbar configs, zomgmoremodular

This commit is contained in:
Hendrik Leppkes
2007-12-12 09:59:17 +00:00
parent 21d87e57cf
commit d56c2cc4fc
4 changed files with 23 additions and 20 deletions
+3 -2
View File
@@ -16,6 +16,7 @@ function Bartender4.Button:Create(id, parent)
local name = ("BT4Button%d"):format(absid)
local button = setmetatable(CreateFrame("CheckButton", name, parent, "SecureActionButtonTemplate, ActionButtonTemplate"), Button_MT)
button.parent = parent
button.settings = parent.module.db
button:SetScript("OnEvent", button.EventHandler)
button:SetScript("OnUpdate", onUpdate)
@@ -216,9 +217,9 @@ function Button:UpdateState()
end
function Button:UpdateUsable()
local oor = Bartender4.db.profile.OutOfRange
local oor = self.settings.profile.OutOfRange
local isUsable, notEnoughMana = IsUsableAction(self.action)
local oorcolor, oomcolor = Bartender4.db.profile.Colors.range, Bartender4.db.profile.Colors.mana
local oorcolor, oomcolor = self.settings.profile.Colors.range, self.settings.profile.Colors.mana
if ( oor ~= "button" or not self.outOfRange) then
if ( oor == "none" or not self.outOfRange) then
self.hotkey:SetVertexColor(1.0, 1.0, 1.0)