comparison modules/VehicleExit.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 0e20f65375d5
comparison
equal deleted inserted replaced
222:d08a74e86c96 223:c4b134512c50
27 ReAction:RegisterBarOptionGenerator(self, "GetBarOptions") 27 ReAction:RegisterBarOptionGenerator(self, "GetBarOptions")
28 28
29 ReAction.RegisterCallback(self, "OnCreateBar") 29 ReAction.RegisterCallback(self, "OnCreateBar")
30 ReAction.RegisterCallback(self, "OnDestroyBar") 30 ReAction.RegisterCallback(self, "OnDestroyBar")
31 ReAction.RegisterCallback(self, "OnRefreshBar") 31 ReAction.RegisterCallback(self, "OnRefreshBar")
32 end
33
34 function module:OnEnable()
35 ReAction:RegisterBarType(Button)
36 end
37
38 function module:OnDisable()
39 ReAction:UnregisterBarType(Button)
40 end 32 end
41 33
42 function module:OnCreateBar(event, bar, name) 34 function module:OnCreateBar(event, bar, name)
43 if bar.config.type == moduleID then 35 if bar.config.type == moduleID then
44 self:OnRefreshBar(event, bar, name) 36 self:OnRefreshBar(event, bar, name)