Mercurial > wow > reaction
comparison modules/VehicleExit.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 |
---|---|
39 ReAction.RegisterCallback(self, "OnEraseBar") | 39 ReAction.RegisterCallback(self, "OnEraseBar") |
40 ReAction.RegisterCallback(self, "OnRenameBar") | 40 ReAction.RegisterCallback(self, "OnRenameBar") |
41 end | 41 end |
42 | 42 |
43 function module:OnEnable() | 43 function module:OnEnable() |
44 ReAction:RegisterBarType(L["Exit Vehicle Floater"], | 44 ReAction:RegisterBarType(Button) |
45 { | |
46 type = moduleID , | |
47 defaultButtonSize = 36, | |
48 defaultBarRows = 1, | |
49 defaultBarCols = 1, | |
50 defaultBarSpacing = 3 | |
51 }) | |
52 end | 45 end |
53 | 46 |
54 function module:OnDisable() | 47 function module:OnDisable() |
55 ReAction:UnregisterBarType(L["Exit Vehicle Floater"]) | 48 ReAction:UnregisterBarType(Button) |
56 end | 49 end |
57 | 50 |
58 function module:OnCreateBar(event, bar, name) | 51 function module:OnCreateBar(event, bar, name) |
59 if bar.config.type == moduleID then | 52 if bar.config.type == moduleID then |
60 self:OnRefreshBar(event, bar, name) | 53 self:OnRefreshBar(event, bar, name) |