comparison Core.lua @ 67:b6c30a5156f9

Rearranged options to go with their related features.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Wed, 28 Jul 2010 07:35:14 -0700
parents 32d53abee666
children 2d65db19d3ce
comparison
equal deleted inserted replaced
66:b7bc0488f13b 67:b6c30a5156f9
9 local GREEN = "|cFF00FF00" 9 local GREEN = "|cFF00FF00"
10 local YELLOW = "|cFFFFFF00" 10 local YELLOW = "|cFFFFFF00"
11 local ORANGE = "|cFFFF7F00" 11 local ORANGE = "|cFFFF7F00"
12 local TEAL = "|cFF00FF9A" 12 local TEAL = "|cFF00FF9A"
13 local GOLD = "|cFFFFD700" 13 local GOLD = "|cFFFFD700"
14
15
16 ItemAuditor.Options = {
17 handler = ItemAuditor,
18 name = "ItemAuditor @project-version@",
19 type = 'group',
20 args = {
21 options = {
22 type = "execute",
23 name = "options",
24 desc = "Show Blizzard's options GUI",
25 func = "ShowOptionsGUI",
26 guiHidden = true,
27 },
28 debug = {
29 type = "execute",
30 name = "debug",
31 desc = "Shows the debug frame",
32 func = function() ItemAuditor_DebugFrame:Show() end,
33 guiHidden = true,
34 },
35 suspend = {
36 type = "toggle",
37 name = "suspend",
38 desc = "Suspends ItemAuditor",
39 get = "IsEnabled",
40 set = "SetEnabled",
41 guiHidden = true,
42 },
43 },
44 }
14 45
15 function ItemAuditor:OnInitialize() 46 function ItemAuditor:OnInitialize()
16 local DB_defaults = { 47 local DB_defaults = {
17 char = { 48 char = {
18 ah = 1, 49 ah = 1,
36 outbound_cod = {}, 67 outbound_cod = {},
37 }, 68 },
38 } 69 }
39 self.db = LibStub("AceDB-3.0"):New("ItemAuditorDB", DB_defaults, true) 70 self.db = LibStub("AceDB-3.0"):New("ItemAuditorDB", DB_defaults, true)
40 71
41 self:RegisterOptions() 72 self.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("ItemAuditor", "ItemAuditor")
73
74 DevTools_Dump(ItemAuditor.Options);
75 LibStub("AceConfig-3.0"):RegisterOptionsTable("ItemAuditor", ItemAuditor.Options, {"ia"})
42 ItemAuditor:RegisterFrame(ItemAuditor_DebugFrame) 76 ItemAuditor:RegisterFrame(ItemAuditor_DebugFrame)
43 77
44 --@debug@ 78 --@debug@
45 -- ItemAuditor_DebugFrame:Show() 79 -- ItemAuditor_DebugFrame:Show()
46 -- self:CreateFrame('tab_crafting') 80 -- self:CreateFrame('tab_crafting')
47 self:RegisterEvent("TRADE_SKILL_SHOW", function() 81 self:RegisterEvent("TRADE_SKILL_SHOW", function()
48 ItemAuditor:CreateFrame('tab_crafting') 82 ItemAuditor:CreateFrame('tab_crafting')
49 end) 83 end)
50 --@end-debug@ 84 --@end-debug@
51 end 85 end
86
87
52 88
53 local registeredEvents = {} 89 local registeredEvents = {}
54 local originalRegisterEvent = ItemAuditor.RegisterEvent 90 local originalRegisterEvent = ItemAuditor.RegisterEvent
55 function ItemAuditor:RegisterEvent(event, callback, arg) 91 function ItemAuditor:RegisterEvent(event, callback, arg)
56 registeredEvents[event] = true 92 registeredEvents[event] = true