Mercurial > wow > reaction
comparison modules/Stance.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 | 9b9f5fc84d34 |
comparison
equal
deleted
inserted
replaced
| 222:d08a74e86c96 | 223:c4b134512c50 |
|---|---|
| 23 self.buttons = { } | 23 self.buttons = { } |
| 24 | 24 |
| 25 ReAction.RegisterCallback(self, "OnCreateBar", "OnRefreshBar") | 25 ReAction.RegisterCallback(self, "OnCreateBar", "OnRefreshBar") |
| 26 ReAction.RegisterCallback(self, "OnDestroyBar") | 26 ReAction.RegisterCallback(self, "OnDestroyBar") |
| 27 ReAction.RegisterCallback(self, "OnRefreshBar") | 27 ReAction.RegisterCallback(self, "OnRefreshBar") |
| 28 end | |
| 29 | |
| 30 function module:OnEnable() | |
| 31 ReAction:RegisterBarType(Button) | |
| 32 end | |
| 33 | |
| 34 function module:OnDisable() | |
| 35 ReAction:UnregisterBarType(Button) | |
| 36 end | 28 end |
| 37 | 29 |
| 38 function module:OnDestroyBar(event, bar, name) | 30 function module:OnDestroyBar(event, bar, name) |
| 39 local btns = self.buttons[bar] | 31 local btns = self.buttons[bar] |
| 40 if btns then | 32 if btns then |
