summaryrefslogtreecommitdiff
path: root/core/input
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-09-01 08:20:20 +0200
committerGitHub <noreply@github.com>2022-09-01 08:20:20 +0200
commit8812f0c896a14ee6e9b870f71dc2b27a1e834787 (patch)
treedf98b634fcbbc02b16f2149409562b5d41eaabf2 /core/input
parentd111ca4afcce494da6948cb6c09d85b0d6db8235 (diff)
parent660c700f9c1b2537ec9f2ae90fbd9c756a96883e (diff)
Merge pull request #64444 from timothyqiu/action-completion
Fix action name completion for `Input`
Diffstat (limited to 'core/input')
-rw-r--r--core/input/input.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp
index 4e538a85ae..1390a0a7fa 100644
--- a/core/input/input.cpp
+++ b/core/input/input.cpp
@@ -169,11 +169,10 @@ void Input::_bind_methods() {
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
String pf = p_function;
- if (p_idx == 0 &&
- (pf == "is_action_pressed" || pf == "action_press" || pf == "action_release" ||
- pf == "is_action_just_pressed" || pf == "is_action_just_released" ||
- pf == "get_action_strength" || pf == "get_action_raw_strength" ||
- pf == "get_axis" || pf == "get_vector")) {
+
+ if ((p_idx == 0 && (pf == "is_action_pressed" || pf == "action_press" || pf == "action_release" || pf == "is_action_just_pressed" || pf == "is_action_just_released" || pf == "get_action_strength" || pf == "get_action_raw_strength")) ||
+ (p_idx < 2 && pf == "get_axis") ||
+ (p_idx < 4 && pf == "get_vector")) {
List<PropertyInfo> pinfo;
ProjectSettings::get_singleton()->get_property_list(&pinfo);