raylib/src
Doyle da836a732c
Android: Better track touch input returned from IsMouse*() (#1144)
* Android: Better track touch input returned from IsMouse*()

Switch to actually tracking touch input to use for "mouse" input rather
than the gestures system. The gesture system as an abstraction ontop of
raw touch input loses some information needed to map to "mouse"
input.

Before,
- IsMouseButtonReleased() triggers immediately after the initial touch
(because GESTURE_TAP activates immediately on touch) instead of waiting for the
touch to be released.
- IsMouseButtonUp() returns false, when it should just be the opposite
of IsMouseButtonDown().
- IsMouseButtonDown() returns true only after GESTURE_HOLD (which
activates after some period of time after GESTURE_TAP), when instead it
should just be true whenever there is touch input i.e. gesture !=
GESTURE_NONE or alternatively when any input is received on the screen.

After this PR, touches map closer to mouse input.
- IsMouseButtonReleased() triggers when touch is released (last frame
was touched, this frame not touched).
- IsMouseButtonUp() returns the opposite of IsMouseButtonDown()
- IsMouseButtonDown() is true when
(AMOTION_EVENT_ACTION_DOWN || AMOTION_EVENT_ACTION_MOVE) and false when
(AMOTION_EVENT_ACTION_UP)

* RPI: Include index check for RPI in GetTouchPosition()
2020-03-24 13:23:34 +01:00
..
external Update miniaudio.h 2020-02-19 12:19:41 +01:00
camera.h Comment tweaks 2020-03-23 20:24:20 +01:00
CMakeLists.txt CMakeLists.txt: report generated CMAKE_CONFIGURATION_TYPES 2020-03-24 06:37:22 +01:00
CMakeOptions.txt Add config SUPPORT_SSH_KEYBOARD_RPI 2019-05-21 20:59:13 +02:00
config.h Review default config flags 2020-02-27 16:14:31 +01:00
config.h.in ADDED small compression API 2019-09-09 21:56:16 +02:00
core.c Android: Better track touch input returned from IsMouse*() (#1144) 2020-03-24 13:23:34 +01:00
easings.h Replace tabs with spaces and update year of copyright notices (#927) 2019-08-03 11:07:41 +02:00
gestures.h Review GetCurrentTime() 2020-02-04 17:06:08 +01:00
Makefile Reviewed and Updated Android compilation scripts 2020-03-05 12:25:39 +01:00
models.c Replace external libraries custom allocators by raylib ones #1074 2020-03-17 13:40:07 +01:00
physac.h Review DEBUG trace log and custom allocators 2020-02-10 10:56:39 +01:00
raudio.c Replace external libraries custom allocators by raylib ones #1074 2020-03-17 13:40:07 +01:00
raudio.h Add function prototype 2020-02-14 23:10:02 +01:00
raylib.dll.rc Develop branch integration (#1091) 2020-02-03 18:31:30 +01:00
raylib.dll.rc.data Update resource files 2020-02-06 16:37:38 +01:00
raylib.h Added draw functions to ImageDraw*() (#1138) 2020-03-21 20:23:50 +01:00
raylib.ico Updated icon data 2018-09-26 16:02:42 +02:00
raylib.rc Develop branch integration (#1091) 2020-02-03 18:31:30 +01:00
raylib.rc.data Update resource files 2020-02-06 16:37:38 +01:00
raymath.h Update raymath.h (#1118) 2020-03-02 10:22:08 +01:00
rglfw.c Update year to 2020 2020-01-05 20:01:54 +01:00
rlgl.h Replace external libraries custom allocators by raylib ones #1074 2020-03-17 13:40:07 +01:00
rmem.h Minor format tweaks 2020-02-06 16:44:04 +01:00
rnet.h [rnet] Renamed some functions 2020-02-20 13:46:33 +01:00
shapes.c Replaced fabs() by fabsf() when required 2020-02-28 12:54:39 +01:00
shell.html Avoid icons in shell 2020-03-03 15:53:13 +01:00
text.c Added security check in case init fails #1135 2020-03-17 20:57:01 +01:00
textures.c Review formating from PR #1138 2020-03-21 20:30:40 +01:00
utils.c Android: Support file saving to internal data storage 2020-03-05 18:12:41 +01:00
utils.h Android: Support file saving to internal data storage 2020-03-05 18:12:41 +01:00