mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Allows to map an action to all devices.
This is accomplished by setting a special value (-1) to the device variable in the InputEvent that's being used to compare with the one received from the OS. This special value is invalid for a regular input, so it should be safe. Implements #17942
This commit is contained in:
@@ -39,6 +39,11 @@ class InputMap : public Object {
|
||||
GDCLASS(InputMap, Object);
|
||||
|
||||
public:
|
||||
/**
|
||||
* A special value used to signify that a given Action can be triggered by any device
|
||||
*/
|
||||
static int ALL_DEVICES;
|
||||
|
||||
struct Action {
|
||||
int id;
|
||||
List<Ref<InputEvent> > inputs;
|
||||
|
||||
Reference in New Issue
Block a user