Mercurial > wow > reaction
comparison modules/PetAction.lua @ 223:c4b134512c50
Move RegisterBarType from modules to button classes
| author | Flick <flickerstreak@gmail.com> |
|---|---|
| date | Mon, 22 Nov 2010 10:25:18 -0800 |
| parents | d08a74e86c96 |
| children | 0e20f65375d5 |
comparison
equal
deleted
inserted
replaced
| 222:d08a74e86c96 | 223:c4b134512c50 |
|---|---|
| 40 ReAction:RegisterBarOptionGenerator(self, "GetBarOptions") | 40 ReAction:RegisterBarOptionGenerator(self, "GetBarOptions") |
| 41 | 41 |
| 42 ReAction.RegisterCallback(self, "OnCreateBar") | 42 ReAction.RegisterCallback(self, "OnCreateBar") |
| 43 ReAction.RegisterCallback(self, "OnDestroyBar") | 43 ReAction.RegisterCallback(self, "OnDestroyBar") |
| 44 ReAction.RegisterCallback(self, "OnRefreshBar") | 44 ReAction.RegisterCallback(self, "OnRefreshBar") |
| 45 end | |
| 46 | |
| 47 function module:OnEnable() | |
| 48 ReAction:RegisterBarType(Button) | |
| 49 end | |
| 50 | |
| 51 function module:OnDisable() | |
| 52 ReAction:UnregisterBarType(Button) | |
| 53 end | 45 end |
| 54 | 46 |
| 55 function module:OnCreateBar(event, bar, name) | 47 function module:OnCreateBar(event, bar, name) |
| 56 if bar.config.type == moduleID then | 48 if bar.config.type == moduleID then |
| 57 -- auto show/hide when pet exists | 49 -- auto show/hide when pet exists |
