Avoid ending mouse scroll chain when scroll bar is 'off'.

Also added mouse-scroll style to UISpinBox.
This commit is contained in:
BenDol
2014-07-13 01:46:47 +12:00
parent 07ac5c27ca
commit 5909634837
2 changed files with 20 additions and 0 deletions

View File

@@ -107,12 +107,18 @@ end
function UIScrollArea:onMouseWheel(mousePos, mouseWheel)
if self.verticalScrollBar then
if not self.verticalScrollBar:isOn() then
return false
end
if mouseWheel == MouseWheelUp then
self.verticalScrollBar:decrement()
else
self.verticalScrollBar:increment()
end
elseif self.horizontalScrollBar then
if not self.horizontalScrollBar:isOn() then
return false
end
if mouseWheel == MouseWheelUp then
self.horizontalScrollBar:increment()
else