Mercurial > wow > reaction
comparison modules/PetAction.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 | d08a74e86c96 |
comparison
equal
deleted
inserted
replaced
217:9c0691e91488 | 218:e63aefb8a555 |
---|---|
52 ReAction.RegisterCallback(self, "OnEraseBar") | 52 ReAction.RegisterCallback(self, "OnEraseBar") |
53 ReAction.RegisterCallback(self, "OnRenameBar") | 53 ReAction.RegisterCallback(self, "OnRenameBar") |
54 end | 54 end |
55 | 55 |
56 function module:OnEnable() | 56 function module:OnEnable() |
57 ReAction:RegisterBarType(L["Pet Action Bar"], | 57 ReAction:RegisterBarType(Button) |
58 { | |
59 type = moduleID , | |
60 defaultButtonSize = 30, | |
61 defaultBarRows = 1, | |
62 defaultBarCols = 10, | |
63 defaultBarSpacing = 8 | |
64 }) | |
65 end | 58 end |
66 | 59 |
67 function module:OnDisable() | 60 function module:OnDisable() |
68 ReAction:UnregisterBarType(L["Pet Action Bar"]) | 61 ReAction:UnregisterBarType(Button) |
69 end | 62 end |
70 | 63 |
71 function module:OnCreateBar(event, bar, name) | 64 function module:OnCreateBar(event, bar, name) |
72 if bar.config.type == moduleID then | 65 if bar.config.type == moduleID then |
73 -- auto show/hide when pet exists | 66 -- auto show/hide when pet exists |