add horizontal scrolling, fix #3

This commit is contained in:
airstruck
2016-01-28 16:17:33 -05:00
parent 93e619862e
commit bbbdccb3b5
3 changed files with 36 additions and 16 deletions

View File

@@ -211,11 +211,15 @@ function Input:handleReshape (layout, width, height)
})
end
function Input:handleWheelMove (layout, x, y)
local mx, my = Backend.getMousePosition()
local hit, widget = checkHit(layout:getWidgetAt(mx, my), layout)
function Input:handleWheelMove (layout, scrollX, scrollY)
local x, y = Backend.getMousePosition()
local hit, widget = checkHit(layout:getWidgetAt(x, y), layout)
widget:bubbleEvent('WheelMove', { hit = hit, x = x, y = y })
widget:bubbleEvent('WheelMove', {
hit = hit,
x = x, y = y,
scrollX = scrollX, scrollY = scrollY
})
return hit
end