comparison modules/Totem.lua @ 223:c4b134512c50

Move RegisterBarType from modules to button classes
author Flick <flickerstreak@gmail.com>
date Mon, 22 Nov 2010 10:25:18 -0800
parents d08a74e86c96
children
comparison
equal deleted inserted replaced
222:d08a74e86c96 223:c4b134512c50
26 ReAction.RegisterCallback(self, "OnCreateBar", "OnRefreshBar") 26 ReAction.RegisterCallback(self, "OnCreateBar", "OnRefreshBar")
27 ReAction.RegisterCallback(self, "OnDestroyBar") 27 ReAction.RegisterCallback(self, "OnDestroyBar")
28 ReAction.RegisterCallback(self, "OnRefreshBar") 28 ReAction.RegisterCallback(self, "OnRefreshBar")
29 29
30 self:RegisterEvent("UPDATE_MULTI_CAST_ACTIONBAR","PLAYER_ENTERING_WORLD") 30 self:RegisterEvent("UPDATE_MULTI_CAST_ACTIONBAR","PLAYER_ENTERING_WORLD")
31 end
32
33 function module:OnEnable()
34 ReAction:RegisterBarType(Button)
35 end
36
37 function module:OnDisable()
38 ReAction:UnregisterBarType(Button)
39 end 31 end
40 32
41 function module:OnDestroyBar(event, bar, name) 33 function module:OnDestroyBar(event, bar, name)
42 local btns = self.buttons[bar] 34 local btns = self.buttons[bar]
43 if btns then 35 if btns then