mirror of
https://github.com/edubart/otclient.git
synced 2025-10-21 23:05:54 +02:00
Avoid ending mouse scroll chain when scroll bar is 'off'.
Also added mouse-scroll style to UISpinBox.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user