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()
|
local virtualOffset = self:getVirtualOffset()
|
||||||
virtualOffset.y = value
|
virtualOffset.y = value
|
||||||
self:setVirtualOffset(virtualOffset)
|
self:setVirtualOffset(virtualOffset)
|
||||||
self:onScrollbarChange(value) -- Maybe there is a better way to do this?
|
if self.onScrollbarChange then self:onScrollbarChange(value) end
|
||||||
end
|
end
|
||||||
self:updateScrollBars()
|
self:updateScrollBars()
|
||||||
end
|
end
|
||||||
|
@ -82,7 +82,7 @@ function UIScrollArea:setHorizontalScrollBar(scrollbar)
|
||||||
local virtualOffset = self:getVirtualOffset()
|
local virtualOffset = self:getVirtualOffset()
|
||||||
virtualOffset.x = value
|
virtualOffset.x = value
|
||||||
self:setVirtualOffset(virtualOffset)
|
self:setVirtualOffset(virtualOffset)
|
||||||
self:onScrollbarChange(value) -- Maybe there is a better way to do this?
|
if self.onScrollbarChange then self:onScrollbarChange(value) end
|
||||||
end
|
end
|
||||||
self:updateScrollBars()
|
self:updateScrollBars()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue