mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Add opt-in support for trackpad touch events. Add touch device types.
- Add new touch device type enum ("touchscreen", "touchpad", "touchpadrelative"). Coordinates for touchscreens are window-relative DPI-scaled pixels, and coordinates for touchpads are normalized [0, 1] values.
- Add new devicetype enum and ismouse boolean params to touch callbacks.
- Add love.touch.getDeviceType(touchid), love.touch.isMouse(touchid), and optional device type filter param for love.touch.getTouches.
- Add t.trackpadtouch boolean (defaults to false) to love.conf. Trackpad touch events will not be generated unless it's enabled.
Currently the trackpadtouch setting only works on macOS.
Resolves #1633.
Resolves #2093.
This commit is contained in:
@@ -1182,6 +1182,7 @@ target_link_libraries(love_timer PUBLIC
|
||||
#
|
||||
|
||||
add_library(love_touch_root STATIC
|
||||
src/modules/touch/Touch.cpp
|
||||
src/modules/touch/Touch.h
|
||||
src/modules/touch/wrap_Touch.cpp
|
||||
src/modules/touch/wrap_Touch.h
|
||||
|
||||
Reference in New Issue
Block a user