Merge: gamnit: abstract camera scroll and zoom service
authorJean Privat <jean@pryen.org>
Tue, 11 Apr 2017 12:30:26 +0000 (08:30 -0400)
committerJean Privat <jean@pryen.org>
Tue, 11 Apr 2017 12:30:26 +0000 (08:30 -0400)
commitc915cfadfb71bdb6cdd15090b9ede4e1179e1690
treeb8a615da6a275dc34df47bf748757791a9a94ffc
parentb636f2c932f49042d895637a721ee90a8a125433
parentd52e56db63ccd790c90f4c5f000da2f5f01fe715
Merge: gamnit: abstract camera scroll and zoom service

The new service `accept_scroll_and_zoom` lets the user adjust the camera using platform specific controls. On desktop computers, the mouse wheel controls the zoom and the middle mouse button drags the world/camera. On Android, a pinch gesture controls the zoom and 2 fingers slide the scroll.

This reuse the previous `accept_two_fingers_motion` and intro an implementation for desktop computers. It will be used by, at least, Sputnit in which it will replace the current implementation which is broken since the upgrade to SDL2.

Pull-Request: #2407
lib/gamnit/flat.nit