Make sure frame objects are hovered before allowing them to be resized

This commit is contained in:
Kenny Shields 2014-09-28 15:17:13 -04:00
parent 3a59f46cca
commit 2ef6d6b3b5

View File

@ -504,7 +504,7 @@ function newobject:mousepressed(x, y, button)
self.dragging = true self.dragging = true
end end
end end
if not self.resizing and self.canresize then if not self.resizing and self.canresize and loveframes.hoverobject == self then
if loveframes.util.BoundingBox(self.x, x, self.y, y, 5, 1, 5, 1) then if loveframes.util.BoundingBox(self.x, x, self.y, y, 5, 1, 5, 1) then
self.resizing = true self.resizing = true
self.dragging = false self.dragging = false