virtualx-engine/scene
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
..
2d Use internal physics processing for Nodes' internal logic 2018-04-11 09:28:14 +02:00
3d Use internal physics processing for Nodes' internal logic 2018-04-11 09:28:14 +02:00
animation Use internal physics processing for Nodes' internal logic 2018-04-11 09:28:14 +02:00
audio Merge pull request #15910 from robfram/fix-audio-signal-issue-15895 2018-02-01 16:54:31 +01:00
gui Use internal physics processing for Nodes' internal logic 2018-04-11 09:28:14 +02:00
main Implement universal translation of touch to mouse 2018-04-30 19:03:38 +02:00
resources Merge pull request #18072 from AlexHolly/master 2018-04-08 21:44:07 -03:00
register_scene_types.cpp Add base support for 2D meshes in Godot, including Sprite -> Mesh2D conversion. 2018-02-21 09:39:09 -03:00
register_scene_types.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
scene_string_names.cpp Renamed tree_exited to tree_exiting. tree_exited is now used for actual out of tree notification. 2018-01-12 08:29:24 -03:00
scene_string_names.h Renamed tree_exited to tree_exiting. tree_exited is now used for actual out of tree notification. 2018-01-12 08:29:24 -03:00
SCsub disable caching for targets using helper functions 2017-11-28 23:24:12 -04:00