Mercurial > wow > reaction
comparison modules/ReAction_ModuleTemplate/ReAction_ModuleName.lua @ 28:21bcaf8215ff
- converted to Ace3
- rearranged file layout
- configGUI menus not working right now
| author | Flick <flickerstreak@gmail.com> |
|---|---|
| date | Mon, 17 Mar 2008 18:24:53 +0000 |
| parents | bf997ea151ca |
| children | 768be7eb22a0 |
comparison
equal
deleted
inserted
replaced
| 27:f1e838841ce1 | 28:21bcaf8215ff |
|---|---|
| 14 -- mixins go here | 14 -- mixins go here |
| 15 ) | 15 ) |
| 16 | 16 |
| 17 -- module methods | 17 -- module methods |
| 18 function module:OnInitialize() | 18 function module:OnInitialize() |
| 19 self.db = ReAction:AcquireDBNamespace(moduleID) | 19 self.db = ReAction.db:RegisterNamespace( moduleID |
| 20 ReAction:RegisterDefaults(moduleID,"profile", | |
| 21 { | 20 { |
| 22 | 21 profile = { |
| 22 -- default profile goes here | |
| 23 } | |
| 23 } | 24 } |
| 24 ) | 25 ) |
| 26 | |
| 27 end | |
| 25 end | 28 end |
| 26 | 29 |
| 27 function module:OnEnable() | 30 function module:OnEnable() |
| 28 | 31 |
| 29 end | 32 end |
| 30 | 33 |
| 31 function module:OnDisable() | 34 function module:OnDisable() |
| 32 | 35 |
| 33 end | 36 end |
| 34 | 37 |
| 35 function module:OnProfileEnable() | 38 |
| 39 ---- ReAction module API ---- | |
| 40 | |
| 41 -- apply module features and settings to a bar object (see Bar.lua for Bar API) | |
| 42 function module:ApplyToBar(bar) | |
| 36 | 43 |
| 37 end | 44 end |
| 38 | 45 |
| 39 function module:OnProfileDisable() | 46 -- remove module features and settings from a bar object |
| 47 function module:RemoveFromBar(bar) | |
| 40 | 48 |
| 41 end | 49 end |
| 42 | 50 |
| 51 -- refresh module features and settings on a bar object | |
| 52 function module:RefreshBar(bar) | |
| 53 | |
| 54 end | |
| 55 | |
| 56 -- notification of config mode (true/false) on the list of bars | |
| 57 function module:ApplyConfigMode(mode,listOfBars) | |
| 58 | |
| 59 end | |
| 60 | |
| 61 -- return a name-modifier (suffix) for the bar name display. This can reflect a dynamic state. | |
| 62 function module:GetBarNameModifier(bar) | |
| 63 return nil | |
| 64 end | |
| 65 | |
| 66 -- erase any local configuration entries for the supplied bar name | |
| 67 function module:EraseBarConfig(barName) | |
| 68 | |
| 69 end | |
| 70 | |
| 71 -- update any local configuration entries with the new bar name index | |
| 72 function module:RenameBarConfig(oldName, newName) | |
| 73 | |
| 74 end |
