godot/scene/main
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
..
canvas_layer.cpp Removed strange custom world2d in CanvasLayer, been there since always and not sure why. 2018-04-07 19:43:09 -03:00
canvas_layer.h Removed strange custom world2d in CanvasLayer, been there since always and not sure why. 2018-04-07 19:43:09 -03:00
http_request.cpp Refactor version macros and fix related bugs 2018-02-23 20:15:29 +01:00
http_request.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
instance_placeholder.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
instance_placeholder.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
node.cpp Made print_tree_pretty() function which displays scene tree graphically 2018-04-09 15:01:37 +02:00
node.h Made print_tree_pretty() function which displays scene tree graphically 2018-04-09 15:01:37 +02:00
resource_preloader.cpp Bind many more properties to scripts 2018-01-12 00:58:14 +02:00
resource_preloader.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
scene_tree.cpp Implement universal translation of touch to mouse 2018-04-30 19:03:38 +02:00
scene_tree.h Use MultiplayerAPI class for high level networking 2018-03-03 18:34:22 +01:00
SCsub style: Fix PEP8 whitespace issues in Python files 2016-11-01 00:35:16 +01:00
timer.cpp Bind many more properties to scripts 2018-01-12 00:58:14 +02:00
timer.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
viewport.cpp Implement Input.set_default_cursor_shape to change the default shape 2018-04-10 11:38:34 -03:00
viewport.h Improve popup menus usability 2018-04-07 01:06:02 +02:00