- split actionbar module and prototype into independent files

- added meta functions to update bars/buttons
- first options
This commit is contained in:
Hendrik Leppkes
2007-12-03 14:58:16 +00:00
parent 0fc2692a53
commit 276d0b6d1f
6 changed files with 308 additions and 136 deletions
+45
View File
@@ -0,0 +1,45 @@
--[[ $Id$ ]]
local getFunc, setFunc
do
function getFunc(info)
return (info.arg and Bartender4.db.profile[info.arg] or Bartender4.db.profile[info[#info]])
end
function setFunc(info, value)
local key = info.arg or info[#info]
Bartender4.db.profile[key] = value
end
end
function Bartender4:SetupOptions()
self.options = {
type = "group",
name = "Bartender4",
icon = "Interface\\Icons\\INV_Drink_05",
childGroups = "tree",
args = {
gui = {
type = "execute",
name = "gui",
order = 1,
desc = "Open GUI",
func = function() LibStub("AceConfigDialog-3.0"):Open("Bartender4") end,
guiHidden = true,
},
general = {
type = "group",
--cmdInline = true,
name = "General Settings",
get = getFunc,
set = setFunc,
args = {},
},
},
}
LibStub("AceConfig-3.0"):RegisterOptionsTable("Bartender4", self.options, "bar")
end
function Bartender4:RegisterModuleOptions(key, table)
self.options.args[key] = table
end