You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix action name completion for Input
This commit is contained in:
@@ -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 {
|
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||||
String pf = p_function;
|
String pf = p_function;
|
||||||
if (p_idx == 0 &&
|
|
||||||
(pf == "is_action_pressed" || pf == "action_press" || pf == "action_release" ||
|
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 == "is_action_just_pressed" || pf == "is_action_just_released" ||
|
(p_idx < 2 && pf == "get_axis") ||
|
||||||
pf == "get_action_strength" || pf == "get_action_raw_strength" ||
|
(p_idx < 4 && pf == "get_vector")) {
|
||||||
pf == "get_axis" || pf == "get_vector")) {
|
|
||||||
List<PropertyInfo> pinfo;
|
List<PropertyInfo> pinfo;
|
||||||
ProjectSettings::get_singleton()->get_property_list(&pinfo);
|
ProjectSettings::get_singleton()->get_property_list(&pinfo);
|
||||||
|
|
||||||
|
|||||||
@@ -2031,8 +2031,13 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context,
|
|||||||
r_type.type.kind = GDScriptParser::DataType::NATIVE;
|
r_type.type.kind = GDScriptParser::DataType::NATIVE;
|
||||||
r_type.type.native_type = p_identifier;
|
r_type.type.native_type = p_identifier;
|
||||||
r_type.type.is_constant = true;
|
r_type.type.is_constant = true;
|
||||||
r_type.type.is_meta_type = !Engine::get_singleton()->has_singleton(p_identifier);
|
if (Engine::get_singleton()->has_singleton(p_identifier)) {
|
||||||
r_type.value = Variant();
|
r_type.type.is_meta_type = false;
|
||||||
|
r_type.value = Engine::get_singleton()->get_singleton_object(p_identifier);
|
||||||
|
} else {
|
||||||
|
r_type.type.is_meta_type = true;
|
||||||
|
r_type.value = Variant();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user