diff options
author | Xwdit <xwditfr@gmail.com> | 2022-07-15 05:36:25 +0200 |
---|---|---|
committer | Xwdit <44023235+Xwdit@users.noreply.github.com> | 2022-08-10 15:05:47 +0200 |
commit | 7e262310a2db5802726f78c54a7db7f2646d3fa8 (patch) | |
tree | 4ac3d25cc46a97a7e45ce9e2fe8415bc77af7656 /modules/gdscript | |
parent | 1b06b668c9f0c42927a427f9c9057711a4adafe4 (diff) |
Fixed incorrect type display of void return in GDScript editor tooltips
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 2613e1c626..35dbdf8c8d 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -660,7 +660,13 @@ static String _make_arguments_hint(const MethodInfo &p_info, int p_arg_idx, bool } static String _make_arguments_hint(const GDScriptParser::FunctionNode *p_function, int p_arg_idx) { - String arghint = p_function->get_datatype().to_string() + " " + p_function->identifier->name.operator String() + "("; + String arghint; + + if (p_function->get_datatype().builtin_type == Variant::NIL) { + arghint = "void " + p_function->identifier->name.operator String() + "("; + } else { + arghint = p_function->get_datatype().to_string() + " " + p_function->identifier->name.operator String() + "("; + } for (int i = 0; i < p_function->parameters.size(); i++) { if (i > 0) { |