summaryrefslogtreecommitdiff
path: root/tools/doc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/doc')
-rw-r--r--tools/doc/doc_data.cpp15
-rw-r--r--tools/doc/doc_data.h2
2 files changed, 10 insertions, 7 deletions
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index c1d3e5e314..11e4797747 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -187,14 +187,13 @@ void DocData::generate(bool p_basic_types) {
arginfo=E->get().return_val;
- if (arginfo.type==Variant::NIL)
- continue;
#ifdef DEBUG_METHODS_ENABLED
if (m && m->get_return_type()!=StringName())
method.return_type=m->get_return_type();
- else
+ else if (arginfo.type!=Variant::NIL) // {
#endif
method.return_type=(arginfo.hint==PROPERTY_HINT_RESOURCE_TYPE)?arginfo.hint_string:Variant::get_type_name(arginfo.type);
+// }
} else {
@@ -585,7 +584,10 @@ void DocData::generate(bool p_basic_types) {
md.name=mi.name;
if (mi.return_val.name!="")
md.return_type=mi.return_val.name;
- else
+ else if (mi.name.find(":")!=-1) {
+ md.return_type=mi.name.get_slice(":",1);
+ md.name=mi.name.get_slice(":",0);
+ } else
md.return_type=Variant::get_type_name(mi.return_val.type);
for(int i=0;i<mi.arguments.size();i++) {
@@ -595,8 +597,9 @@ void DocData::generate(bool p_basic_types) {
ArgumentDoc ad;
ad.name=pi.name;
+
if (pi.type==Variant::NIL)
- ad.type="var";
+ ad.type="Variant";
else
ad.type=Variant::get_type_name( pi.type );
diff --git a/tools/doc/doc_data.h b/tools/doc/doc_data.h
index b62eb21b4a..877f30defb 100644
--- a/tools/doc/doc_data.h
+++ b/tools/doc/doc_data.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */