mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
added scrollbody resize-to-parent on update
This commit is contained in:
parent
334ce1b2c7
commit
90483c8833
@ -152,6 +152,17 @@ function newobject:update(dt)
|
||||
self.y = parent.y + self.staticy
|
||||
end
|
||||
|
||||
-- resize to parent
|
||||
if parent ~= base then
|
||||
if self.bartype == "vertical" then
|
||||
self.height = self.parent.height
|
||||
self.staticx = self.parent.width - self.width
|
||||
elseif self.bartype == "horizontal" then
|
||||
self.width = self.parent.width
|
||||
self.staticy = self.parent.height - self.height
|
||||
end
|
||||
end
|
||||
|
||||
for k, v in ipairs(internals) do
|
||||
v:update(dt)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user