Messing around with some options stuff.
This commit is contained in:
parent
af32bfc19d
commit
2639a27e4b
3 changed files with 30 additions and 3 deletions
1
.pkgmeta
1
.pkgmeta
|
@ -5,6 +5,7 @@ externals:
|
|||
Libs/AceAddon-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0
|
||||
Libs/CallbackHandler-1.0: svn://svn.wowace.com/wow/callbackhandler/mainline/trunk/CallbackHandler-1.0
|
||||
Libs/AceConsole-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0
|
||||
Libs/AceConfig-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk
|
||||
Libs/AceDB-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDB-3.0
|
||||
Libs/AceEvent-3.0: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0
|
||||
Libs/LibBabble-Zone-3.0: svn://svn.wowace.com/wow/libbabble-zone-3-0/mainline/trunk
|
||||
|
|
|
@ -7,7 +7,6 @@ local LDBIcon
|
|||
local tooltip
|
||||
local LBZ
|
||||
local zones
|
||||
|
||||
local trackedInstances
|
||||
|
||||
local defaults = {
|
||||
|
@ -20,6 +19,27 @@ local defaults = {
|
|||
},
|
||||
}
|
||||
|
||||
local options = {
|
||||
name = 'ChoreTracker',
|
||||
type = 'group',
|
||||
args = {
|
||||
minimap = {
|
||||
name = 'Hide Minimap Icon',
|
||||
desc = 'Removes the icon from your minimap.',
|
||||
type = 'toggle',
|
||||
get = function(info) return core.db.profile.minimap.hide end,
|
||||
set = function(info, value)
|
||||
core.db.profile.minimap.hide = value
|
||||
if core.db.profile.minimap.hide then
|
||||
core.LDBIcon:Hide('ChoreTracker')
|
||||
else
|
||||
core.LDBIcon:Show('ChoreTracker')
|
||||
end
|
||||
end,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local classColors = {}
|
||||
local flagColors = {}
|
||||
|
||||
|
@ -62,7 +82,7 @@ end
|
|||
|
||||
function core:OnEnable()
|
||||
LQT = LibStub('LibQTip-1.0')
|
||||
LBZ = LibStub("LibBabble-Zone-3.0")
|
||||
LBZ = LibStub('LibBabble-Zone-3.0')
|
||||
|
||||
LoadAddOn('Blizzard_Calendar')
|
||||
|
||||
|
@ -94,7 +114,7 @@ function core:OnEnable()
|
|||
type = 'data source',
|
||||
text = 'ChoreTracker',
|
||||
icon = 'Interface\\AddOns\\ChoreTracker\\icon',
|
||||
OnClick = function() print('ChoreTracker test') end,
|
||||
OnClick = function() LibStub("AceConfigDialog-3.0"):Open("ChoreTracker") end,
|
||||
OnEnter = function(self)
|
||||
local columnCount = 2
|
||||
for instance,abbreviation in pairs(trackedInstances) do
|
||||
|
@ -133,6 +153,11 @@ function core:OnEnable()
|
|||
[zones['Blackwing Descent']] = 'BWD',
|
||||
[zones['Throne of the Four Winds']] = '4W',
|
||||
}
|
||||
|
||||
-- Add options to Interface Panel
|
||||
LibStub('AceConfigRegistry-3.0'):RegisterOptionsTable('ChoreTracker', options)
|
||||
local ACD = LibStub('AceConfigDialog-3.0')
|
||||
ACD:AddToBlizOptions('ChoreTracker', 'ChoreTracker')
|
||||
end
|
||||
|
||||
function core:UpdateChores()
|
||||
|
|
|
@ -11,6 +11,7 @@ Libs\LibStub\LibStub.lua
|
|||
Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
|
||||
Libs\AceAddon-3.0\AceAddon-3.0.xml
|
||||
Libs\AceConsole-3.0\AceConsole-3.0.xml
|
||||
Libs\AceConfig-3.0\AceConfig-3.0.xml
|
||||
Libs\AceDB-3.0\AceDB-3.0.xml
|
||||
Libs\AceEvent-3.0\AceEvent-3.0.xml
|
||||
Libs\LibBabble-Zone-3.0\lib.xml
|
||||
|
|
Loading…
Reference in a new issue