mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
input: Bug fix: wheel direction is opposite on browsers
This commit is contained in:
parent
0224858b7b
commit
8df596396c
@ -249,8 +249,8 @@ func OnMouseMove(e js.Value) {
|
|||||||
|
|
||||||
func OnWheel(e js.Value) {
|
func OnWheel(e js.Value) {
|
||||||
// TODO: What if e.deltaMode is not DOM_DELTA_PIXEL?
|
// TODO: What if e.deltaMode is not DOM_DELTA_PIXEL?
|
||||||
theInput.wheelX = e.Get("deltaX").Float()
|
theInput.wheelX = -e.Get("deltaX").Float()
|
||||||
theInput.wheelY = e.Get("deltaY").Float()
|
theInput.wheelY = -e.Get("deltaY").Float()
|
||||||
}
|
}
|
||||||
|
|
||||||
func OnTouchStart(e js.Value) {
|
func OnTouchStart(e js.Value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user