1
0
Fork 0

Actually load LibQTib and create options interface.

This commit is contained in:
Andrew Tomaka 2011-09-16 16:00:16 -04:00
parent 23218fff14
commit 41d6b3beaa

View file

@ -1,6 +1,7 @@
ChoreTracker = LibStub('AceAddon-3.0'):NewAddon('ChoreTracker', 'AceConsole-3.0', 'AceEvent-3.0') ChoreTracker = LibStub('AceAddon-3.0'):NewAddon('ChoreTracker', 'AceConsole-3.0', 'AceEvent-3.0')
local core = ChoreTracker local core = ChoreTracker
local LibQTip local LibQTip
local db
local trackedInstances = { local trackedInstances = {
['Baradin Hold'] = 'BH', ['Baradin Hold'] = 'BH',
@ -11,7 +12,27 @@ local trackedInstances = {
} }
local defaults = { local defaults = {
global = {} global = {},
profile = {
instances = {},
},
}
local options_setter = function(info, v) local t=core.db.profile for k=1,#info-1 do t=t[info[k]] end t[info[#info]]=v end
local options_getter = function(info) local t=core.db.profile for k=1,#info-1 do t=t[info[k]] end return t[info[#info]] end
local options = {
name = 'ChoreTracker',
type = 'group',
set = options_setter,
get = options_getter,
args = {
enabled = {
name = 'Toggle Instances',
type = 'group',
order = 10,
args = {},
}
}
} }
local classColors = {} local classColors = {}
@ -44,6 +65,13 @@ function core:OnInitialize()
} }
self.db.global[realm][name].lockouts = {} self.db.global[realm][name].lockouts = {}
end end
-- Generate our options and add them to Blizzard Interface
LibStub('AceConfigRegistry-3.0'):RegisterOptionsTable('ChoreTracker', options)
local ACD = LibStub('AceConfigDialog-3.0')
ACD:AddToBlizOptions('ChoreTracker', 'ChoreTracker')
LoadAddOn('LibQTip-1.0')
end end
function core:OnEnable() function core:OnEnable()