Mercurial > wow > reaction
comparison modules/Bag.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 | df68b5a40490 |
children | bb13624de7e1 |
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["Bag Bar"], | 41 ReAction:RegisterBarType(Button) |
42 { | |
43 type = moduleID , | |
44 defaultButtonSize = 30, | |
45 defaultBarRows = 1, | |
46 defaultBarCols = 6, | |
47 defaultBarSpacing = 4 | |
48 }) | |
49 end | 42 end |
50 | 43 |
51 function module:OnDisable() | 44 function module:OnDisable() |
52 ReAction:UnregisterBarType(L["Bag Bar"]) | 45 ReAction:UnregisterBarType(Button) |
53 end | 46 end |
54 | 47 |
55 function module:OnDestroyBar(event, bar, name) | 48 function module:OnDestroyBar(event, bar, name) |
56 local btns = self.buttons[bar] | 49 local btns = self.buttons[bar] |
57 if btns then | 50 if btns then |