Should use the set minimum for these!

master
BenDol 10 years ago
parent d070711409
commit 2ada93db9c

@ -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()

@ -239,7 +239,7 @@ function UIScrollBar:onMouseWheel(mousePos, mouseWheel)
end
if mouseWheel == MouseWheelUp then
if self.orientation == 'vertical' then
if self.value < 1 then return false end
if self.value <= self.minimum then return false end
self:decrement()
else
if self.value >= self.maximum then return false end
@ -250,7 +250,7 @@ function UIScrollBar:onMouseWheel(mousePos, mouseWheel)
if self.value >= self.maximum then return false end
self:increment()
else
if self.value < 1 then return false end
if self.value <= self.minimum then return false end
self:decrement()
end
end

Loading…
Cancel
Save