mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-26 05:14:21 +00:00
The columnlistarea object will only update its children if they are within its boundaries
This commit is contained in:
parent
7c4b3b9804
commit
6cede1d844
@ -73,7 +73,10 @@ function newobject:update(dt)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for k, v in ipairs(children) do
|
for k, v in ipairs(children) do
|
||||||
v:update(dt)
|
local col = loveframes.util.BoundingBox(self.x, v.x, self.y, v.y, self.width, v.width, self.height, v.height)
|
||||||
|
if col then
|
||||||
|
v:update(dt)
|
||||||
|
end
|
||||||
v:SetClickBounds(self.x, self.y, self.width, self.height)
|
v:SetClickBounds(self.x, self.y, self.width, self.height)
|
||||||
v.y = (v.parent.y + v.staticy) - self.offsety + cheight
|
v.y = (v.parent.y + v.staticy) - self.offsety + cheight
|
||||||
v.x = (v.parent.x + v.staticx) - self.offsetx
|
v.x = (v.parent.x + v.staticx) - self.offsetx
|
||||||
@ -133,7 +136,7 @@ function newobject:draw()
|
|||||||
|
|
||||||
for k, v in ipairs(children) do
|
for k, v in ipairs(children) do
|
||||||
local col = loveframes.util.BoundingBox(self.x, v.x, self.y, v.y, self.width, v.width, self.height, v.height)
|
local col = loveframes.util.BoundingBox(self.x, v.x, self.y, v.y, self.width, v.width, self.height, v.height)
|
||||||
if col == true then
|
if col then
|
||||||
v:draw()
|
v:draw()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user