Update scrollarea position after initial calculations

This commit is contained in:
Kenny Shields 2014-01-24 22:45:40 -05:00
parent cb59b59a73
commit 69e38a4972

View File

@ -45,18 +45,9 @@ function newobject:update(dt)
end
end
local parent = self.parent
local base = loveframes.base
local update = self.Update
-- move to parent if there is a parent
if parent ~= base then
self.x = parent.x + self.staticx
self.y = parent.y + self.staticy
end
self:CheckHover()
local base = loveframes.base
local parent = self.parent
local pinternals = parent.internals
local button = pinternals[2]
@ -70,6 +61,7 @@ function newobject:update(dt)
local internals = self.internals
local bar = internals[1]
local hover = self.hover
local update = self.Update
if button then
if bartype == "vertical" then
@ -85,6 +77,12 @@ function newobject:update(dt)
end
end
-- move to parent if there is a parent
if parent ~= base then
self.x = parent.x + self.staticx
self.y = parent.y + self.staticy
end
if down then
if scrolldelay < time then
self.scrolldelay = time + delayamount