Removed duplicate events

This commit is contained in:
rozenmad 2021-09-06 14:44:29 +03:00 committed by GitHub
parent edab2be4c7
commit a5f77dce96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,8 +26,6 @@ function newobject:initialize()
self.toggleable = false
self.toggle = false
self.OnClick = nil
self.OnMouseOver = nil
self.OnMouseOut = nil
self.groupIndex = 0
self.checked = false
self.mouseover = false
@ -72,15 +70,7 @@ function newobject:update(dt)
if downobject == self then
self.hover = true
end
if onmouseout and self.mouseover then
onmouseout(self)
self.mouseover = false
end
else
if onmouseover and not self.mouseover then
onmouseover(self)
self.mouseover = true
end
if downobject == self then
self.down = true
end