Mercurial > wow > reaction
comparison ReAction.lua @ 46:aa0b7fd68462
rearranged options table initialization a little
| author | Flick <flickerstreak@gmail.com> |
|---|---|
| date | Thu, 10 Apr 2008 23:27:58 +0000 |
| parents | dc898780fea8 |
| children | e12b736c23c3 |
comparison
equal
deleted
inserted
replaced
| 45:38ee32135d86 | 46:aa0b7fd68462 |
|---|---|
| 147 self:RegisterChatCommand("reaction", SlashHandler) | 147 self:RegisterChatCommand("reaction", SlashHandler) |
| 148 self:RegisterChatCommand("rxn", SlashHandler) | 148 self:RegisterChatCommand("rxn", SlashHandler) |
| 149 self:RegisterEvent("PLAYER_REGEN_DISABLED") | 149 self:RegisterEvent("PLAYER_REGEN_DISABLED") |
| 150 | 150 |
| 151 self.bars = {} | 151 self.bars = {} |
| 152 self.options = {} | |
| 153 | |
| 154 self:RegisterOptions("global", self, { | |
| 155 unlock = { | |
| 156 type = "toggle", | |
| 157 handler = module, | |
| 158 name = L["Unlock Bars"], | |
| 159 desc = L["Unlock bars for dragging and resizing with the mouse"], | |
| 160 get = function() return self.configMode end, | |
| 161 set = function(info, value) self:SetConfigMode(value) end, | |
| 162 disabled = InCombatLockdown, | |
| 163 order = 1 | |
| 164 }, | |
| 165 }) | |
| 166 | |
| 152 end | 167 end |
| 153 | 168 |
| 154 function ReAction:OnEnable() | 169 function ReAction:OnEnable() |
| 155 InitializeBars() | 170 InitializeBars() |
| 156 end | 171 end |
| 284 self:CallMethodOnAllModules("RenameBarConfig", name, newname) | 299 self:CallMethodOnAllModules("RenameBarConfig", name, newname) |
| 285 self.callbacks:Fire("OnRenameBar", name, newname) | 300 self.callbacks:Fire("OnRenameBar", name, newname) |
| 286 end | 301 end |
| 287 end | 302 end |
| 288 | 303 |
| 289 ReAction.options = {} | |
| 290 -- See modules/ReAction_ConfigUI for valid options contexts. | 304 -- See modules/ReAction_ConfigUI for valid options contexts. |
| 291 function ReAction:RegisterOptions(context, module, opts) | 305 function ReAction:RegisterOptions(context, module, opts) |
| 292 if module == nil or context == nil then | 306 if module == nil or context == nil then |
| 293 error("ReAction:RegisterOptions requires a module object and context ID") | 307 error("ReAction:RegisterOptions requires a module object and context ID") |
| 294 end | 308 end |
