Should use the set minimum for these!
This commit is contained in:
parent
d070711409
commit
2ada93db9c
|
@ -111,7 +111,8 @@ function UIScrollArea:onMouseWheel(mousePos, mouseWheel)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if mouseWheel == MouseWheelUp then
|
if mouseWheel == MouseWheelUp then
|
||||||
if self.verticalScrollBar:getValue() < 1 then
|
local minimum = self.verticalScrollBar:getMinimum()
|
||||||
|
if self.verticalScrollBar:getValue() < minimum then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
self.verticalScrollBar:decrement()
|
self.verticalScrollBar:decrement()
|
||||||
|
@ -133,7 +134,8 @@ function UIScrollArea:onMouseWheel(mousePos, mouseWheel)
|
||||||
end
|
end
|
||||||
self.horizontalScrollBar:increment()
|
self.horizontalScrollBar:increment()
|
||||||
else
|
else
|
||||||
if self.horizontalScrollBar:getValue() < 1 then
|
local minimum = self.horizontalScrollBar:getMinimum()
|
||||||
|
if self.horizontalScrollBar:getValue() < minimum then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
self.horizontalScrollBar:decrement()
|
self.horizontalScrollBar:decrement()
|
||||||
|
|
|
@ -239,7 +239,7 @@ function UIScrollBar:onMouseWheel(mousePos, mouseWheel)
|
||||||
end
|
end
|
||||||
if mouseWheel == MouseWheelUp then
|
if mouseWheel == MouseWheelUp then
|
||||||
if self.orientation == 'vertical' 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()
|
self:decrement()
|
||||||
else
|
else
|
||||||
if self.value >= self.maximum then return false end
|
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
|
if self.value >= self.maximum then return false end
|
||||||
self:increment()
|
self:increment()
|
||||||
else
|
else
|
||||||
if self.value < 1 then return false end
|
if self.value <= self.minimum then return false end
|
||||||
self:decrement()
|
self:decrement()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue