Important fix to uiscrollarea
I messed up the code and forgot to commit this. ->Check if function is set before calling it here.
This commit is contained in:
parent
5756f20026
commit
f0e9cf070e
|
@ -71,7 +71,7 @@ function UIScrollArea:setVerticalScrollBar(scrollbar)
|
|||
local virtualOffset = self:getVirtualOffset()
|
||||
virtualOffset.y = value
|
||||
self:setVirtualOffset(virtualOffset)
|
||||
self:onScrollbarChange(value) -- Maybe there is a better way to do this?
|
||||
if self.onScrollbarChange then self:onScrollbarChange(value) end
|
||||
end
|
||||
self:updateScrollBars()
|
||||
end
|
||||
|
@ -82,7 +82,7 @@ function UIScrollArea:setHorizontalScrollBar(scrollbar)
|
|||
local virtualOffset = self:getVirtualOffset()
|
||||
virtualOffset.x = value
|
||||
self:setVirtualOffset(virtualOffset)
|
||||
self:onScrollbarChange(value) -- Maybe there is a better way to do this?
|
||||
if self.onScrollbarChange then self:onScrollbarChange(value) end
|
||||
end
|
||||
self:updateScrollBars()
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue