Mercurial > wow > reaction
comparison modules/Action.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 | d58055179c16 | 
| children | a4e7475633b3 | 
   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["Action Bar"], | 41 ReAction:RegisterBarType(Button, true) | 
| 42 { | |
| 43 type = moduleID, | |
| 44 defaultButtonSize = 36, | |
| 45 defaultBarRows = 1, | |
| 46 defaultBarCols = 12, | |
| 47 defaultBarSpacing = 3 | |
| 48 }, true) | |
| 49 ReAction:GetModule("State"):RegisterStateProperty("page", nil, PropHandler.GetOptions(), PropHandler) | 42 ReAction:GetModule("State"):RegisterStateProperty("page", nil, PropHandler.GetOptions(), PropHandler) | 
| 50 end | 43 end | 
| 51 | 44 | 
| 52 function module:OnDisable() | 45 function module:OnDisable() | 
| 53 ReAction:UnregisterBarType(L["Action Bar"]) | 46 ReAction:UnregisterBarType(Button) | 
| 54 ReAction:GetModule("State"):UnregisterStateProperty("page") | 47 ReAction:GetModule("State"):UnregisterStateProperty("page") | 
| 55 end | 48 end | 
| 56 | 49 | 
| 57 function module:OnCreateBar(event, bar, name) | 50 function module:OnCreateBar(event, bar, name) | 
| 58 if bar.config.type == moduleID then | 51 if bar.config.type == moduleID then | 
