mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Update scrollarea position after initial calculations
This commit is contained in:
parent
cb59b59a73
commit
69e38a4972
@ -45,18 +45,9 @@ function newobject:update(dt)
|
|||||||
end
|
end
|
||||||
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()
|
self:CheckHover()
|
||||||
|
|
||||||
|
local base = loveframes.base
|
||||||
local parent = self.parent
|
local parent = self.parent
|
||||||
local pinternals = parent.internals
|
local pinternals = parent.internals
|
||||||
local button = pinternals[2]
|
local button = pinternals[2]
|
||||||
@ -70,6 +61,7 @@ function newobject:update(dt)
|
|||||||
local internals = self.internals
|
local internals = self.internals
|
||||||
local bar = internals[1]
|
local bar = internals[1]
|
||||||
local hover = self.hover
|
local hover = self.hover
|
||||||
|
local update = self.Update
|
||||||
|
|
||||||
if button then
|
if button then
|
||||||
if bartype == "vertical" then
|
if bartype == "vertical" then
|
||||||
@ -85,6 +77,12 @@ function newobject:update(dt)
|
|||||||
end
|
end
|
||||||
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 down then
|
||||||
if scrolldelay < time then
|
if scrolldelay < time then
|
||||||
self.scrolldelay = time + delayamount
|
self.scrolldelay = time + delayamount
|
||||||
|
Loading…
Reference in New Issue
Block a user