godot/platform/javascript
Pedro J. Estébanez de9d40a953 Implement universal translation of touch to mouse
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*)

The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers.

Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse.

*: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest.

On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction.

Plus: Improve/fix tracking of current mouse position.

** Summary of changes to settings: **

- `display/window/handheld/emulate_touchscreen` becomes `input/pointing_devices/emulate_touch_from_mouse`
- New setting: `input/pointing_devices/emulate_mouse_from_touch`
2018-04-30 19:03:38 +02:00
..
api Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
export HTML export: Make s3tc the standard Texture Format 2018-01-20 15:20:26 +01:00
audio_driver_javascript.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
audio_driver_javascript.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
detect.py Merge pull request #17792 from eska014/enginejs-preloadpaths 2018-04-04 22:26:14 +02:00
dom_keys.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
engine.js Fix engine.js startGame() when loading from directory 2018-03-27 11:26:34 +02:00
http_client.h.inc Warn when polling HTTPClient synchronously in HTML5 platform 2018-02-17 18:12:50 +01:00
http_client_javascript.cpp Fix bug in HTML5 HTTPClient. 2018-03-30 14:31:18 +02:00
http_request.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
http_request.js Update copyright statements to 2018 2018-01-01 14:40:47 +01:00
javascript_eval.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
javascript_main.cpp Refactor JavaScript platform build script 2018-03-26 19:46:56 +02:00
logo.png Fixed iCCp chunk in pngs 2016-06-22 21:13:29 +02:00
os_javascript.cpp Implement universal translation of touch to mouse 2018-04-30 19:03:38 +02:00
os_javascript.h Refactor JavaScript platform build script 2018-03-26 19:46:56 +02:00
platform_config.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
pre.js Expose Emscripten libs to engine.js discreetly 2018-03-27 09:12:08 +02:00
run_icon.png Use custom native-run icons for Android and HTML5 2017-06-27 21:06:26 +02:00
SCsub Refactor JavaScript platform build script 2018-03-26 19:46:56 +02:00