- split actionbar module and prototype into independent files
- added meta functions to update bars/buttons - first options
This commit is contained in:
+45
@@ -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
|
||||
Reference in New Issue
Block a user