mirror of
https://github.com/edubart/otclient.git
synced 2025-10-21 23:05:54 +02:00
Should use the set minimum for these!
This commit is contained in:
@@ -111,7 +111,8 @@ function UIScrollArea:onMouseWheel(mousePos, mouseWheel)
|
||||
return false
|
||||
end
|
||||
if mouseWheel == MouseWheelUp then
|
||||
if self.verticalScrollBar:getValue() < 1 then
|
||||
local minimum = self.verticalScrollBar:getMinimum()
|
||||
if self.verticalScrollBar:getValue() < minimum then
|
||||
return false
|
||||
end
|
||||
self.verticalScrollBar:decrement()
|
||||
@@ -133,7 +134,8 @@ function UIScrollArea:onMouseWheel(mousePos, mouseWheel)
|
||||
end
|
||||
self.horizontalScrollBar:increment()
|
||||
else
|
||||
if self.horizontalScrollBar:getValue() < 1 then
|
||||
local minimum = self.horizontalScrollBar:getMinimum()
|
||||
if self.horizontalScrollBar:getValue() < minimum then
|
||||
return false
|
||||
end
|
||||
self.horizontalScrollBar:decrement()
|
||||
|
Reference in New Issue
Block a user