From: Jean Privat Date: Tue, 11 Apr 2017 12:30:26 +0000 (-0400) Subject: Merge: gamnit: abstract camera scroll and zoom service X-Git-Url: http://nitlanguage.org 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 --- c915cfadfb71bdb6cdd15090b9ede4e1179e1690 diff --cc lib/gamnit/flat.nit index 027d349,c9935d8..d59d7e3 --- a/lib/gamnit/flat.nit +++ b/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` #