Small bugfix
Forgot to add a check - if it has a parent or not
This commit is contained in:
@@ -588,12 +588,14 @@ return function(name)
|
|||||||
self:registerEvent("mouse_drag", v)
|
self:registerEvent("mouse_drag", v)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self.parent:addEvent("mouse_drag", self)
|
if(self.parent~=nil)then
|
||||||
activeEvents["mouse_drag"] = true
|
self.parent:addEvent("mouse_drag", self)
|
||||||
self.parent:addEvent("mouse_click", self)
|
activeEvents["mouse_drag"] = true
|
||||||
activeEvents["mouse_click"] = true
|
self.parent:addEvent("mouse_click", self)
|
||||||
self.parent:addEvent("mouse_up", self)
|
activeEvents["mouse_click"] = true
|
||||||
activeEvents["mouse_up"] = true
|
self.parent:addEvent("mouse_up", self)
|
||||||
|
activeEvents["mouse_up"] = true
|
||||||
|
end
|
||||||
return self
|
return self
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user