Simplify input related operations such as gesture detection, input mapping and clicking/dragging game objects
FIX: Pinch state was not accurately calculated sometimes
FIX: Cursor string URLs were not working as intended.
CHANGE: The onscreen.lua
module will now handle switch to multitouch mode on iOS. Thanks @aglitchman !
NEW: The gesture module will now report repeated
on touch events. Thanks @Jerakin!
NEW: Added cursor.reset(url)
to reset the state of a cursor. Useful when a window focus lost or minimize event happens and you want to clear the state of the cursor.
FIX: There is no longer a requirement that cursor.init()
has been called before cursor.listener()
NEW: Programatically start a cursor drag operation (info: https://github.com/britzl/defold-input/blob/master/in/cursor.md#drag-objects)
NEW: Added origin_x
and origin_y
to drag event to give position of mouse/touch down
NEW: Added drag_event_only
option to cursor to only send the drag event but not start dragging the object under the cursor
Thanks to @Trevortni for the contributions!
FIX: Clear drag state on release if drag was cancelled. Thanks @Trevortni
FIX: Don't ignore a potential drag (press+move) just because the cursor moved outside of the object but hasn't yet reached the drag threshold.
FIX: Cancelled drag events prevented further drag events