CameraTools.updateScrollWheelZoom

This commit is contained in:
2022-06-27 14:03:26 +00:00
parent 6084d53d2d
commit 5489630553

View File

@@ -73,4 +73,11 @@
(<= top mPos.y (+ top margin)))
->(if (= bottom FlxG.height)
(<= (- bottom margin) mPos.y)
(<= (- bottom margin) mPos.y bottom)))))
(<= (- bottom margin) mPos.y bottom)))))
(function updateScrollWheelZoom [:FlxCamera camera :Float elapsed :Float speed]
#{
if (FlxG.mouse.wheel != 0) {
camera.zoom += (FlxG.mouse.wheel * elapsed * speed);
}
}#)