Noah Petherbridge
a24c94a161
Add multi-touch gesture support so that the player can scroll the level in the editor (and title screen) by treating a two finger swipe to be equivalent to a middle click drag. Fun quirks found with SDL2's MultiGestureEvent: * They don't begin sending us the event until motion is detected after two fingers have touched the screen; not the moment the second finger touches it. * It spams us with events when it detects any tiny change and a lot of cool details like rotate/pinch deltas, but it never tells us when the multitouch STOPS! The game has to block left clicks while multitouch happens so the user doesn't draw all over their level, so it needs to know when touch has ended. * The workaround is to track the mouse cursor position at the first touch and each delta thereafter; if the deltas stop changing tick to tick, unset the "is touching" variable. |
||
---|---|---|
.. | ||
actor_animation.go | ||
actor_collision.go | ||
actor_events.go | ||
actor.go | ||
canvas_actors.go | ||
canvas_cursor.go | ||
canvas_editable.go | ||
canvas_link_tool.go | ||
canvas_present.go | ||
canvas_scrolling.go | ||
canvas_strokes.go | ||
canvas_wallpaper.go | ||
canvas_zoom.go | ||
canvas.go | ||
scripting.go |