ddnet/src
Robert Müller 36f19f491e Support touch input in engine, UI and console
Add support for touch input to the engine, UI and console. Ingame touch controls require more discussion and will be delivered separately based on this engine implementation.

Engine
------

The state of all currently pressed touch fingers is aggregated based on the SDL touch events and can be retrieved with the `IInput::TouchFingerStates` function. This design is less complex than an event-based system where the touch events are delivered to the individual client components, as each system would then have to keep track of the finger states individually. However, this means that only one component can handle touch fingers at any given time, which seems like a reasonable assumption for our use cases.

Obsolete code for relative mouse handling on Android is removed. Connecting a mouse to an Android device should now also work as expected, as more recent SDL/Android versions support relative mouse input natively.

User Interface
--------------

Support absolute mouse positioning and clicking in the user interfaces (menus, editor, demo player) with touch presses.

Support right clicking by pressing and holding one finger at roughly the same position for 0.5 seconds.

Support scrolling scroll regions up and down with a two finger swiping gesture. Fast scrolling via a two finger flinging gesture is not yet supported and would be a useful future extension.

The menus and demo player are fully usable with touch inputs. The editor is only fully usable with an external keyboard and/or mouse, as panning the map is not currently possible with only touch inputs, which is also left as a possible future extension.

Console
-------

The touch input logic for the user interface is reused for the console. Thereby, text selection in the console with touch input works, although the text can only be copied by pressing Ctrl+C with an external keyboard at the moment. In the future, we could add buttons to the console to activate the search and copy functionalities with touch inputs.

Support scrolling the console history up and down with a two finger swiping gesture.

The local/remote consoles can currently only be opened with an external keyboard. The ingame touch controls will also include buttons to open the consoles.
2024-07-19 13:36:04 +02:00
..
android Implement client restarting on Android 2024-07-16 12:52:19 +02:00
antibot Rename all variables for strict camel-casing of abbreviations 2024-03-05 15:44:09 +01:00
base Disable "Run server" button and process functions on Android 2024-07-17 16:48:17 +02:00
engine Support touch input in engine, UI and console 2024-07-19 13:36:04 +02:00
game Support touch input in engine, UI and console 2024-07-19 13:36:04 +02:00
macos Add INotifications kernel interface 2023-12-16 18:15:43 +01:00
masterping update ci actions, update rust edition to 2021 since our MSRV covers it 2024-02-25 15:55:10 +01:00
mastersrv mastersrv: Fix warning about unused mut 2024-07-01 22:18:50 +02:00
rust-bridge Rename all variables for strict camel-casing of abbreviations 2024-03-05 15:44:09 +01:00
steam Rename all variables for strict camel-casing of abbreviations 2024-03-05 15:44:09 +01:00
test Remove support for space separation 2024-07-09 08:30:59 +08:00
tools Simplify usage of IClient::SnapGetItem function 2024-07-14 13:15:44 +02:00