summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript_editor.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index e2f2b7fc3b..18dfa49b97 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -555,7 +555,7 @@ static String _get_visual_datatype(const PropertyInfo &p_info, bool p_isarg = tr
}
if (p_info.type == Variant::NIL) {
if (p_isarg || (p_info.usage & PROPERTY_USAGE_NIL_IS_VARIANT)) {
- return "var";
+ return "Variant";
} else {
return "void";
}
@@ -1736,14 +1736,12 @@ static String _make_arguments_hint(const MethodInfo &p_info, int p_arg_idx) {
for (const List<PropertyInfo>::Element *E = p_info.arguments.front(); E; E = E->next()) {
if (i > 0) {
arghint += ", ";
- } else {
- arghint += " ";
}
if (i == p_arg_idx) {
arghint += String::chr(0xFFFF);
}
- arghint += _get_visual_datatype(E->get(), true) + " " + E->get().name;
+ arghint += E->get().name + ": " + _get_visual_datatype(E->get(), true);
if (i - def_args >= 0) {
arghint += String(" = ") + p_info.default_arguments[i - def_args].get_construct_string();
@@ -1759,8 +1757,6 @@ static String _make_arguments_hint(const MethodInfo &p_info, int p_arg_idx) {
if (p_info.flags & METHOD_FLAG_VARARG) {
if (p_info.arguments.size() > 0) {
arghint += ", ";
- } else {
- arghint += " ";
}
if (p_arg_idx >= p_info.arguments.size()) {
arghint += String::chr(0xFFFF);
@@ -1770,9 +1766,6 @@ static String _make_arguments_hint(const MethodInfo &p_info, int p_arg_idx) {
arghint += String::chr(0xFFFF);
}
}
- if (p_info.arguments.size() > 0 || (p_info.flags & METHOD_FLAG_VARARG)) {
- arghint += " ";
- }
arghint += ")";
@@ -1787,14 +1780,12 @@ static String _make_arguments_hint(const GDScriptParser::FunctionNode *p_functio
for (int i = 0; i < p_function->arguments.size(); i++) {
if (i > 0) {
arghint += ", ";
- } else {
- arghint += " ";
}
if (i == p_arg_idx) {
arghint += String::chr(0xFFFF);
}
- arghint += p_function->argument_types[i].to_string() + " " + p_function->arguments[i].operator String();
+ arghint += p_function->arguments[i].operator String() + ": " + p_function->argument_types[i].to_string();
if (i - def_args >= 0) {
String def_val = "<unknown>";
@@ -1818,9 +1809,6 @@ static String _make_arguments_hint(const GDScriptParser::FunctionNode *p_functio
}
}
- if (p_function->arguments.size() > 0) {
- arghint += " ";
- }
arghint += ")";
return arghint;