diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-11-10 21:52:18 +0100 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-11-10 21:52:18 +0100 |
| commit | 5a0c6a8d694559bf13f81476082e7914ce056a39 (patch) | |
| tree | b3e667461de52a75b2b1dea074f0d32e76c37b54 | |
| parent | 8ebb3c7f8580dc03f81dd7fd35ceb0d20e8fe8a0 (diff) | |
| parent | 0baebed41af79821ac64a9f3740c8b9f46b98869 (diff) | |
| download | redot-engine-5a0c6a8d694559bf13f81476082e7914ce056a39.tar.gz | |
Merge pull request #80185 from Sauermann/fiix-action-event-doc
Document that `Input.is_action_*` should not be used during input-handling
| -rw-r--r-- | doc/classes/Input.xml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index e18413810b..334b04a79c 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -198,6 +198,7 @@ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. [b]Note:[/b] Returning [code]true[/code] does not imply that the action is [i]still[/i] pressed. An action can be pressed and released again rapidly, and [code]true[/code] will still be returned so as not to miss input. [b]Note:[/b] Due to keyboard ghosting, [method is_action_just_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. + [b]Note:[/b] During input handling (e.g. [method Node._input]), use [method InputEvent.is_action_pressed] instead to query the action state of the current event. </description> </method> <method name="is_action_just_released" qualifiers="const"> @@ -208,6 +209,7 @@ Returns [code]true[/code] when the user [i]stops[/i] pressing the action event in the current frame or physics tick. It will only return [code]true[/code] on the frame or tick that the user releases the button. [b]Note:[/b] Returning [code]true[/code] does not imply that the action is [i]still[/i] not pressed. An action can be released and pressed again rapidly, and [code]true[/code] will still be returned so as not to miss input. If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + [b]Note:[/b] During input handling (e.g. [method Node._input]), use [method InputEvent.is_action_released] instead to query the action state of the current event. </description> </method> <method name="is_action_pressed" qualifiers="const"> |
