From 660c700f9c1b2537ec9f2ae90fbd9c756a96883e Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Mon, 15 Aug 2022 23:28:49 +0800 Subject: Fix action name completion for `Input` --- core/input/input.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'core/input') diff --git a/core/input/input.cpp b/core/input/input.cpp index e08647f5ea..617e31d008 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 *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 pinfo; ProjectSettings::get_singleton()->get_property_list(&pinfo); -- cgit v1.2.3