Mercurial > wow > reaction
comparison modules/Stance.lua @ 218:e63aefb8a555
Demodularization of buttons
- register class instead of config
| author | Flick <flickerstreak@gmail.com> |
|---|---|
| date | Fri, 19 Nov 2010 23:06:24 -0800 |
| parents | bf64e71701e2 |
| children | d08a74e86c96 |
comparison
equal
deleted
inserted
replaced
| 217:9c0691e91488 | 218:e63aefb8a555 |
|---|---|
| 36 ReAction.RegisterCallback(self, "OnEraseBar") | 36 ReAction.RegisterCallback(self, "OnEraseBar") |
| 37 ReAction.RegisterCallback(self, "OnRenameBar") | 37 ReAction.RegisterCallback(self, "OnRenameBar") |
| 38 end | 38 end |
| 39 | 39 |
| 40 function module:OnEnable() | 40 function module:OnEnable() |
| 41 ReAction:RegisterBarType(L["Stance Bar"], | 41 ReAction:RegisterBarType(Button) |
| 42 { | |
| 43 type = moduleID , | |
| 44 defaultButtonSize = 36, | |
| 45 defaultBarRows = 1, | |
| 46 defaultBarCols = 6, | |
| 47 defaultBarSpacing = 3 | |
| 48 }) | |
| 49 | |
| 50 end | 42 end |
| 51 | 43 |
| 52 function module:OnDisable() | 44 function module:OnDisable() |
| 53 ReAction:UnregisterBarType(L["Stance Bar"]) | 45 ReAction:UnregisterBarType(Button) |
| 54 end | 46 end |
| 55 | 47 |
| 56 function module:OnDestroyBar(event, bar, name) | 48 function module:OnDestroyBar(event, bar, name) |
| 57 local btns = self.buttons[bar] | 49 local btns = self.buttons[bar] |
| 58 if btns then | 50 if btns then |
