Mercurial > wow > reaction
annotate 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 |
rev | line source |
---|---|
flickerstreak@25 | 1 --[[ |
flickerstreak@25 | 2 ReAction module template |
flickerstreak@25 | 3 |
flickerstreak@25 | 4 --]] |
flickerstreak@25 | 5 |
flickerstreak@25 | 6 -- local imports |
flickerstreak@25 | 7 local ReAction = ReAction |
flickerstreak@25 | 8 local L = ReAction.L |
flickerstreak@25 | 9 local _G = _G |
flickerstreak@25 | 10 |
flickerstreak@25 | 11 -- module declaration |
flickerstreak@25 | 12 local moduleID = "MyModuleName" |
flickerstreak@25 | 13 local module = ReAction:NewModule( moduleID, |
flickerstreak@25 | 14 -- mixins go here |
flickerstreak@25 | 15 ) |
flickerstreak@25 | 16 |
flickerstreak@25 | 17 -- module methods |
flickerstreak@25 | 18 function module:OnInitialize() |
flickerstreak@28 | 19 self.db = ReAction.db:RegisterNamespace( moduleID |
flickerstreak@25 | 20 { |
flickerstreak@28 | 21 profile = { |
flickerstreak@28 | 22 -- default profile goes here |
flickerstreak@28 | 23 } |
flickerstreak@25 | 24 } |
flickerstreak@25 | 25 ) |
flickerstreak@28 | 26 |
flickerstreak@28 | 27 end |
flickerstreak@25 | 28 end |
flickerstreak@25 | 29 |
flickerstreak@25 | 30 function module:OnEnable() |
flickerstreak@25 | 31 |
flickerstreak@25 | 32 end |
flickerstreak@25 | 33 |
flickerstreak@25 | 34 function module:OnDisable() |
flickerstreak@25 | 35 |
flickerstreak@25 | 36 end |
flickerstreak@25 | 37 |
flickerstreak@28 | 38 |
flickerstreak@28 | 39 ---- ReAction module API ---- |
flickerstreak@28 | 40 |
flickerstreak@28 | 41 -- apply module features and settings to a bar object (see Bar.lua for Bar API) |
flickerstreak@28 | 42 function module:ApplyToBar(bar) |
flickerstreak@25 | 43 |
flickerstreak@25 | 44 end |
flickerstreak@25 | 45 |
flickerstreak@28 | 46 -- remove module features and settings from a bar object |
flickerstreak@28 | 47 function module:RemoveFromBar(bar) |
flickerstreak@25 | 48 |
flickerstreak@25 | 49 end |
flickerstreak@25 | 50 |
flickerstreak@28 | 51 -- refresh module features and settings on a bar object |
flickerstreak@28 | 52 function module:RefreshBar(bar) |
flickerstreak@28 | 53 |
flickerstreak@28 | 54 end |
flickerstreak@28 | 55 |
flickerstreak@28 | 56 -- notification of config mode (true/false) on the list of bars |
flickerstreak@28 | 57 function module:ApplyConfigMode(mode,listOfBars) |
flickerstreak@28 | 58 |
flickerstreak@28 | 59 end |
flickerstreak@28 | 60 |
flickerstreak@28 | 61 -- return a name-modifier (suffix) for the bar name display. This can reflect a dynamic state. |
flickerstreak@28 | 62 function module:GetBarNameModifier(bar) |
flickerstreak@28 | 63 return nil |
flickerstreak@28 | 64 end |
flickerstreak@28 | 65 |
flickerstreak@28 | 66 -- erase any local configuration entries for the supplied bar name |
flickerstreak@28 | 67 function module:EraseBarConfig(barName) |
flickerstreak@28 | 68 |
flickerstreak@28 | 69 end |
flickerstreak@28 | 70 |
flickerstreak@28 | 71 -- update any local configuration entries with the new bar name index |
flickerstreak@28 | 72 function module:RenameBarConfig(oldName, newName) |
flickerstreak@28 | 73 |
flickerstreak@28 | 74 end |