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:
parent
bcf5b748b5
commit
1e28f63bcf
4 changed files with 47 additions and 19 deletions
|
|
@ -80,7 +80,7 @@ class ProjectSettingsEditor : public AcceptDialog {
|
|||
ConfirmationDialog *press_a_key;
|
||||
Label *press_a_key_label;
|
||||
ConfirmationDialog *device_input;
|
||||
SpinBox *device_id;
|
||||
OptionButton *device_id;
|
||||
OptionButton *device_index;
|
||||
Label *device_index_label;
|
||||
MenuButton *popup_copy_to_feature;
|
||||
|
|
@ -170,6 +170,10 @@ protected:
|
|||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
||||
int _get_current_device();
|
||||
void _set_current_device(int i_device);
|
||||
String _get_device_string(int i_device);
|
||||
|
||||
public:
|
||||
void add_translation(const String &p_translation);
|
||||
static ProjectSettingsEditor *get_singleton() { return singleton; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue