mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-26 05:14:21 +00:00
Fix minor conflicts in frame drag/resize detection code
This commit is contained in:
parent
55869912e4
commit
f5ca78d4ff
@ -470,7 +470,6 @@ function newobject:mousepressed(x, y, button)
|
|||||||
|
|
||||||
local width = self.width
|
local width = self.width
|
||||||
local height = self.height
|
local height = self.height
|
||||||
local selfcol = loveframes.util.BoundingBox(x, self.x, y, self.y, 1, self.width, 1, self.height)
|
|
||||||
local internals = self.internals
|
local internals = self.internals
|
||||||
local children = self.children
|
local children = self.children
|
||||||
local dragging = self.dragging
|
local dragging = self.dragging
|
||||||
@ -479,8 +478,14 @@ function newobject:mousepressed(x, y, button)
|
|||||||
|
|
||||||
if button == "l" then
|
if button == "l" then
|
||||||
-- initiate dragging if not currently dragging
|
-- initiate dragging if not currently dragging
|
||||||
if not dragging and self.hover then
|
if not dragging and self.hover and self.draggable then
|
||||||
if y < self.y + 25 and self.draggable then
|
local topcol
|
||||||
|
if self.canresize then
|
||||||
|
topcol = loveframes.util.BoundingBox(x, self.x + 2, y, self.y + 2, 1, self.width - 4, 1, 21)
|
||||||
|
else
|
||||||
|
topcol = loveframes.util.BoundingBox(x, self.x, y, self.y, 1, self.width, 1, 25)
|
||||||
|
end
|
||||||
|
if topcol then
|
||||||
if parent == base then
|
if parent == base then
|
||||||
self.clickx = x - self.x
|
self.clickx = x - self.x
|
||||||
self.clicky = y - self.y
|
self.clicky = y - self.y
|
||||||
|
Loading…
Reference in New Issue
Block a user