EricEzaM
0e5c6e0d55
Allow checking for exact matches with Action events.
...
Added additional param to action related methods to test for exactness.
If "p_exact_match" is true, then the action will only be "matched" if the provided input event *exactly* matches with the action event.
Before:
* Action Event = KEY_S
* Input Event = KEY_CONTROL + KEY_S
* Is Action Pressed = True
Now:
You can still do the above, however you can optionally check that the input is exactly what the action event is:
* Action Event = KEY_S
* Input Event = KEY_CONTROL + KEY_S
* p_exact_match = True
* Is Action Pressed = False
* If the Input Event was only KEY_S, then the result would be true.
Usage:
```gdscript
Input.is_action_pressed(action_name: String, exact_match: bool)
Input.is_action_pressed("my_action", true)
InputMap.event_is_action(p_event, "my_action", true)
func _input(event: InputEvent):
event.is_action_pressed("my_action", false, true) # false = "allow_echo", true = "exact_match"
event.is_action("my_action", true)
```
Co-authored-by: Eric M <itsjusteza@gmail.com >
2021-07-30 15:35:39 +02:00
..
2021-07-22 12:43:39 +02:00
2021-07-06 11:10:47 +02:00
2021-07-26 13:26:58 +02:00
2021-07-22 12:41:42 +02:00
2021-07-30 15:35:39 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-07-14 11:43:23 +01:00
2021-07-14 11:43:23 +01:00
2021-06-16 11:56:25 +01:00
2021-05-04 16:30:23 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-07-14 23:09:47 +02:00
2021-05-04 16:30:23 +02:00
2021-05-04 16:30:23 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 16:30:23 +02:00
2021-07-20 13:58:07 +03:00
2021-07-20 13:58:07 +03:00
2021-01-13 16:17:06 +01:00
2021-05-05 15:02:01 +02:00
2021-07-14 11:43:23 +01:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-06-03 15:45:05 +01:00
2021-01-13 16:17:06 +01:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-07-14 21:49:23 +05:30
2021-06-29 14:02:23 +02:00
2021-07-30 15:35:39 +02:00
2021-07-30 15:35:39 +02:00
2021-01-13 16:17:06 +01:00
2021-05-05 15:02:01 +02:00
2021-07-06 11:10:44 +02:00
2020-06-10 15:30:52 +02:00
2021-05-05 15:02:01 +02:00
2021-06-16 11:56:25 +01:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-07-09 11:43:05 -07:00
2021-05-05 15:02:01 +02:00
2021-05-04 16:39:13 +02:00
2021-01-13 16:17:06 +01:00
2021-01-13 16:17:06 +01:00
2021-06-16 11:56:25 +01:00
2021-07-14 11:43:23 +01:00
2021-05-04 16:30:23 +02:00
2021-05-05 15:22:40 +02:00
2021-05-04 16:30:23 +02:00
2021-05-22 08:16:43 +02:00
2021-05-04 14:45:16 +02:00
2021-01-13 16:17:06 +01:00
2021-01-13 16:17:06 +01:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 16:30:23 +02:00
2021-05-05 15:02:01 +02:00
2021-07-14 11:43:23 +01:00
2021-05-05 15:02:01 +02:00
2021-05-04 16:30:23 +02:00
2021-07-19 23:34:23 -04:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-20 13:29:38 +03:00
2021-01-13 16:17:06 +01:00
2021-05-05 15:02:01 +02:00
2021-05-04 16:30:23 +02:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-02-19 11:48:30 +01:00
2021-05-04 14:45:15 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-25 00:31:39 +02:00
2021-05-14 15:15:25 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-07-20 13:05:13 +02:00
2021-05-04 14:45:16 +02:00
2021-06-16 11:56:25 +01:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-07-24 00:51:42 +02:00
2021-05-09 09:29:45 +02:00
2021-07-13 10:20:03 +02:00
2021-05-05 15:02:01 +02:00
2021-07-09 12:49:12 +02:00
2021-05-05 15:02:01 +02:00
2021-07-06 11:24:06 +02:00
2021-05-04 16:30:23 +02:00
2021-06-17 12:47:53 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-01-13 16:17:06 +01:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00