comparison modules/ReAction_ConfigUI/ReAction_ConfigUI.lua @ 44:2232b8336903

- Added bar config tab - rearranged locale string grouping
author Flick <flickerstreak@gmail.com>
date Thu, 03 Apr 2008 23:17:47 +0000
parents 11ddb9610770
children aa0b7fd68462
comparison
equal deleted inserted replaced
43:dc898780fea8 44:2232b8336903
36 disabled = InCombatLockdown, 36 disabled = InCombatLockdown,
37 order = 1 37 order = 1
38 }, 38 },
39 }, 39 },
40 order = 1, 40 order = 1,
41 },
42 bar = {
43 type = "group",
44 name = L["Bar Settings"],
45 desc = L["Configuration settings for bars"],
46 childGroups = "select",
47 args = {
48 all = {
49 type = "group",
50 name = L["All Bars"],
51 desc = L["Settings applicable to all bars"],
52 args = {
53 foo = {
54 type = "toggle",
55 name = "foo",
56 desc = "description",
57 get = function() return true end,
58 set = function() end,
59 }
60 },
61 order = 1
62 }
63 },
64 order = 2
41 }, 65 },
42 module = { 66 module = {
43 type = "group", 67 type = "group",
44 childGroups = "select", 68 childGroups = "select",
45 name = L["Module Settings"], 69 name = L["Module Settings"],
83 107
84 self.configOptions.args.profile = LibStub("AceDBOptions-3.0"):GetOptionsTable(ReAction.db) 108 self.configOptions.args.profile = LibStub("AceDBOptions-3.0"):GetOptionsTable(ReAction.db)
85 self.configOptions.args.profile.order = -2 109 self.configOptions.args.profile.order = -2
86 110
87 LibStub("AceConfigRegistry-3.0"):RegisterOptionsTable("ReAction",self.configOptions) 111 LibStub("AceConfigRegistry-3.0"):RegisterOptionsTable("ReAction",self.configOptions)
88 LibStub("AceConfigDialog-3.0"):AddToBlizOptions("ReAction", "ReAction") 112 self.frame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("ReAction", "ReAction")
113 self.frame.obj.SetCallback(self,"default")
114
89 ReAction.RegisterCallback(self,"OnOptionsRegistered") 115 ReAction.RegisterCallback(self,"OnOptionsRegistered")
90 ReAction.RegisterCallback(self,"OnOptionsRefreshed") 116 ReAction.RegisterCallback(self,"OnOptionsRefreshed")
91 end 117 end
92 118
93 function module:OnOptionsRegistered(evt, context, module, opts) 119 function module:OnOptionsRegistered(evt, context, module, opts)
114 InterfaceOptionsFrame_OpenToFrame("ReAction") 140 InterfaceOptionsFrame_OpenToFrame("ReAction")
115 if bar then 141 if bar then
116 -- TODO: select the correct bar pane 142 -- TODO: select the correct bar pane
117 end 143 end
118 end 144 end
145
146 function module:default()
147 -- called from the Interface Options panel, this returns the current profile to the default
148 ReAction.db:ResetProfile()
149 end
150