ScrollBar handles scroll wheel events

This commit is contained in:
Sasha Koshka 2023-03-10 13:41:47 -05:00
parent 8658ecd879
commit aaa794ac04

View File

@ -123,7 +123,11 @@ func (element *ScrollBar) HandleMouseMove (x, y int) {
}
func (element *ScrollBar) HandleMouseScroll (x, y int, deltaX, deltaY float64) {
if element.vertical {
element.scrollBy(int(deltaY))
} else {
element.scrollBy(int(deltaX))
}
}
// SetEnabled sets whether or not the scroll bar can be interacted with.