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)
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

1  2 
lib/gamnit/flat.nit

@@@ -41,10 -41,8 +41,9 @@@ import performance_analysi
  
  import gamnit
  import gamnit::cameras
 +import gamnit::dynamic_resolution
  import gamnit::limit_fps
- import android_two_fingers_motion is conditional(android)
+ import gamnit::camera_control
  
  # Draw a `texture` at `center`
  #